Sales
The /sales endpoint allows you to view, and upload sales to Dripcel.
Upload sales
- 🔐 Permissions:
["sale.create"]
POST Request
POST /sales
Upload bulk sales to Dripcel.
Note: If the sales you are uploading are from Campaigns V2, you need to send it the cell in international phone number format, example, South Africa: 27631231234.
Body
type Sales = {
/** The campaign ID associated with the sale */
campaign_id: string;
/** The send_id associated with the sale */
send_id?: string;
/** The click_id associated with the sale */
click_id?: string;
/** The cell number of the contact who converted the sale. Can be in local or international format (if local, the country of the corresponding campaign will be used) */
cell: string;
/** The date the sale was made. Must be in ISO format (YYYY-MM-DD), and doesn't have to include time. If blank, the current datetime is used. */
soldAt?: string;
/** The value of the sale. If blank, the `defaultSaleValue` of the corresponding campaign will be used */
saleValue?: number;
}[];
Example
[
{
"cell": "0111111111",
"campaign_id": "639978184d735c88ed8bbd68"
},
{
"saleValue": 100,
"cell": "0111111112",
"soldAt": "2023-02-14",
"campaign_id": "639978184d735c88ed8bbd68",
}
]
GET Request
GET /sales/create
Upload / postback a single sale to Dripcel via a GET request.
Params
The same values as used in a POST request but now used as search parameters of the url.
Note: If the sales you are uploading are from Campaigns V2, you need to send the cell in international phone number format, example, South Africa: 27631231234.
Params = {
/** Your account API key with the required permissions */
key: string;
/** The campaign ID associated with the sale */
campaign_id: string;
/** The send_id ID associated with the sale */
send_id?: string;
/** The click_id ID associated with the sale */
click_id?: string;
/** The cell number of the contact who converted the sale. Can be in local or international format (if local, the country of the corresponding campaign will be used) */
cell: string;
/** The date the sale was made. Must be in ISO format (YYYY-MM-DD), and doesn't have to include time. If blank, the current datetime is used. */
soldAt?: string;
/** The value of the sale. If blank, the `defaultSaleValue` of the corresponding campaign will be used */
saleValue?: number;
};
Example (No Timestamp)
https://api.dripcel.com/sales/create?key=KEY&soldAt=2025-10-14&campaign_id=CAMPAIGN_ID&cell=27112223333
Example (Encoded Timestamp)
https://api.dripcel.com/sales/create?key=KEY&soldAt=2025-10-14%2009%3A02%3A51&campaign_id=CAMPAIGN_ID&cell=27112223333
Response
Success
{
ok: true;
}
Error
{
ok: false;
error: "Campaign not found";
}
{
ok: false;
// A sale is considered a duplicate if it has the same cell number, campaign_id, and soldAt date as an existing sale
error: "Duplicate sale";
}