Skip to content

Commit

Permalink
feat: Glossary and Errors page
Browse files Browse the repository at this point in the history
  • Loading branch information
pepeladeira committed Apr 9, 2024
1 parent e018b61 commit 63feea9
Show file tree
Hide file tree
Showing 7 changed files with 194 additions and 37 deletions.
14 changes: 7 additions & 7 deletions docs/api/create-subscriber.api.mdx

Large diffs are not rendered by default.

73 changes: 73 additions & 0 deletions docs/api/errors.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
id: errors
title: "Errors"
description: "Troubleshoot problems with this comprehensive breakdown of all error codes."
sidebar_label: Errors
hide_title: true
custom_edit_url: null
---

import ApiLogo from "@theme/ApiLogo";
import SchemaTabs from "@theme/SchemaTabs";
import TabItem from "@theme/TabItem";
import Export from "@theme/ApiExplorer/Export";

<span className={"theme-doc-version-badge badge badge--secondary"}>Version: 1.0.0</span>

<Export
url={"https://raw.githubusercontent.com/getpingback/pingback-for-devs/master/specs/api.yaml"}
proxy={undefined}
></Export>

<h1 className={"openapi__heading"}>Errors</h1>

Troubleshoot problems with this comprehensive breakdown of all error codes.

## Error schema

We use standard HTTP response codes for success and failure notifications, and our errors are further classified by type.

### `MISSING_BODY`

- **Status code**: 400
- **Message**: Body is necessary.
- **Suggested action**: Ensure that the request body is not empty.

### `INVALID_INPUT`

- **Status code**: 422
- **Messages**:
- `"field"` is required
- `"email"` must be a valid email
- `"phone"` contains an invalid value
- **Suggested action**: Ensure that the request body is valid, and all required fields are present.

### `INVALID_PARAMS`

- **Status code**: 422
- **Message**: Subscriber email is necessary.
- **Suggested action**: Ensure that the subscriber email is present in the request.

### `SUBSCRIBER_ALREADY_EXISTS`

- **Status code**: 409
- **Message**: Subscriber already exists.
- **Suggested action**: Check if the subscriber already exists before creating a new one.

### `SUBSCRIBER_NOT_FOUND`

- **Status code**: 404
- **Message**: Subscriber not found.
- **Suggested action**: Check if the subscriber exists before using it.

### `SEGMENTATION_LIST_NOT_FOUND`

- **Status code**: 404
- **Message**: Segmentation list not found.
- **Suggested action**: Check if the segmentation list exists before using it.

### `INTERNAL_SERVER_ERROR`

- **Status code**: 500
- **Message**: Internal server error.
- **Suggested action**: Contact support if the error persists.
8 changes: 4 additions & 4 deletions docs/api/get-subscriber.api.mdx

Large diffs are not rendered by default.

62 changes: 62 additions & 0 deletions docs/api/glossary.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
id: glossary
title: "Glossary"
description: "Troubleshoot problems with this comprehensive breakdown of all error codes."
sidebar_label: Glossary
hide_title: true
custom_edit_url: null
---

import ApiLogo from "@theme/ApiLogo";
import SchemaTabs from "@theme/SchemaTabs";
import TabItem from "@theme/TabItem";
import Export from "@theme/ApiExplorer/Export";

<span className={"theme-doc-version-badge badge badge--secondary"}>Version: 1.0.0</span>

<Export
url={"https://raw.githubusercontent.com/getpingback/pingback-for-devs/master/specs/api.yaml"}
proxy={undefined}
></Export>

<h1 className={"openapi__heading"}>Glossary</h1>

This glossary outlines key terms and functionalities of the Pingback API to provide a comprehensive understanding for end users.

## Channel

A **Channel** is the central entity within Pingback, where a user (Channel owner) can manage content and interactions. Key features include:

- **Subscribers Management**: Channels have multiple subscribers who opt-in to receive communications.
- **Content Distribution**: Channel owners can distribute content through newsletters via email or publish it on the channel's blog.
- **Publishing Options**: Content can be selectively published through email, blog, or both.
- **Membership Tiers**: Channels can have both free and paid subscribers. Paid status can be assigned to subscribers who pay or to those selected by the channel owner.
- **Content Access Control**: Channels can restrict content access to either paid or free subscribers.

## Subscriber

A **Subscriber** is an individual who has opted to follow a Channel to receive updates. The status of a Subscriber can be one of the following, which are also the values used in the API to change a Subscriber's status:

- **`free_subscriber`**: Indicates that the Subscriber has free access to the content.
- **`paid_subscriber`**: Indicates that the Subscriber has paid for access to premium content.
- **`unsubscribed_subscriber`**: Indicates that the Subscriber has chosen to opt out of receiving further communications.

Subscribers can provide additional information such as name, phone number, or other custom fields via API. Their status not only defines their access level to the content but also allows for targeted communication strategies within the Channel.

## Custom Field

**Custom Fields** are additional data points that can be associated with a Subscriber's profile, allowing for more detailed information collection and segmentation.

## Segmented Lists

**Segmented Lists** are a feature for organizing Subscribers into specific groups within a Channel. These lists enable targeted content delivery, primarily through email. Key points include:

- **Targeted Communication**: Content can be sent specifically to members of a Segmented List.
- **Web Content Accessibility**: While Segmented Lists are used for email targeting, they do not restrict web content access; a Subscriber not on a specific list can still view content published on the Channel's blog.

## Black List

A **Black List** is a mechanism used in email communication management within the Pingback API. When a Subscriber's actions, such as marking an email as spam or consistently generating bounce-backs, indicate a negative interaction, they are added to the Black List. Key points include:

- **`blackListedAt`**: This field returned by the GET route indicates the date and time when a Subscriber was added to the Black List.
- **Email Management**: Being on the Black List means that the Subscriber will no longer receive future newsletters or communications from the Channel, as this action serves to protect the sender's reputation and ensure email deliverability.
Loading

0 comments on commit 63feea9

Please sign in to comment.