Create Subscription
Create a new subscription for a customer.
Overview
- Method: POST
- Path:
/brand/subscriptions/create-subscription - Tags: brand
Parameters
No parameters required.
Request Body
- Content Type:
application/json - Required: Yes
Fields
| Field | Type | Required | Details |
|---|---|---|---|
| customerId | string | Yes | |
| productVariantId | string | Yes | |
| quantity | number | Yes | |
| frequency | object | Yes | |
| startDate | string | No | |
| paymentMethodId | string | Yes | |
| shippingAddress | string | Yes | |
| lastName | string | Yes | |
| address1 | string | Yes | |
| address2 | string | No | |
| city | string | Yes | |
| state | string | Yes | |
| postalCode | string | Yes | |
| country | string | Yes |
Responses
200
Successful response
Content Type: application/json
{
"id": "string",
"customerId": "string",
"status": {},
"productVariantId": "string",
"quantity": 123,
"frequency": "string",
"nextDeliveryDate": "string",
"paymentMethodId": "string",
"shippingAddress": "string",
"lastName": "string",
"address1": "string",
"address2": "string",
"city": "string",
"state": "string",
"postalCode": "string",
"country": "string"
}400
Bad Request
Content Type: application/json
{}401
Unauthorized
404
Not Found
500
Internal Server Error
Example Usage
curl -X POST \
https://api.pillexa.com/brand/subscriptions/create-subscription \
-H "Content-Type: application/json" \
-d '{"example": "data"}'