post
https://{Host}/v2/partnerProgram/resumeSubscription
Resumes a customer's paused subscription (supplementary partner program).
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Once a member's subscription has been paused, use this API to bring it back online, whether the member asks to resume early, a support agent does it on their behalf, or an automated process triggers it. This API resumes a customer's paused subscription to one or more supplementary partner programs, reactivating benefits under that program immediately. Use the Pause Subscription API to pause a subscription first.
An organization can resume up to 50 customers in a single request.
Example request
curl -X POST "https://eu.api.capillarytech.com/v2/partnerProgram/resumeSubscription" \
-H "Authorization: Basic <base64-encoded-credentials>" \
-H "Content-Type: application/json" \
-d '{
"resumeCustomers": [
{
"customer": {
"id": 382741349
},
"resumePartnerPrograms": [
{
"partnerProgramName": "jotest08",
"resumeType": "MEMBER"
}
]
}
]
}'Prerequisites
- Authentication: Basic or OAuth credentials
- Access group resource: Write access to the
Partner Programresource. For more information, see the access group documentation.
Body parameters
| Field | Type | Required | Description |
|---|---|---|---|
resumeCustomers | array | Required | Batches multiple customers into a single call, so an operational change affecting many subscribers can be applied at once. Max 50 entries per request. |
.customer | object | Required | Identifies which customer's subscription to resume. Object containing exactly one of id, mobile, email, or externalId, whichever identifier you have on hand for this customer. |
..id | integer | Conditional | The customer's unique ID. |
..mobile | string | Conditional | The customer's mobile number. |
..email | string | Conditional | The customer's email address. |
..externalId | string | Conditional | The customer's external ID. |
.resumePartnerPrograms | array | Required | Lets you resume more than one of the customer's supplementary programs in the same call. List of subscriptions to resume for this customer. |
..partnerProgramName | string | Required | Identifies which of the customer's supplementary subscriptions to resume. A customer can be linked to more than one program, so only the one named here is affected. No length limit is enforced by this API. Find the partner program names a customer is currently linked to via the Get customer activity history API; filter its response for partnerProgramType: SUPPLEMENTARY and linked: true. |
..resumeType | enum | Required | Who or what triggered the resume. Supported values: MEMBER: the customer initiated the resume, AGENT: a support or store agent initiated the resume, SYSTEM: an automated process initiated the resume. Case-sensitive. |
API Quick Reference
resumeCustomers[] (array, required)
customer (object, required)
id (integer, conditional)
mobile (string, conditional)
email (string, conditional)
externalId (string, conditional)
resumePartnerPrograms[] (array, required)
partnerProgramName (string, required)
resumeType (enum, required)
Example response
{
"resumeCustomers": [
{
"customer": {
"id": 382741349,
"mobile": "919876543210",
"email": "[email protected]",
"externalId": "X916215000000",
"status": {
"status": true,
"message": "Customer successfully retrieved",
"code": 1000
}
},
"resumePartnerPrograms": [
{
"partnerProgramName": "jotest08",
"resumeType": "MEMBER",
"partnerResumeStatus": {
"status": true,
"message": "Success",
"code": 200
}
}
]
}
],
"warnings": []
}Response parameters
| Field | Type | Description |
|---|---|---|
resumeCustomers | array | Echoes the requested customers, with a status attached to each subscription entry. |
.customer | object | Object containing the full resolved customer record. Lets you confirm exactly which customer the resume was applied to. |
..id | integer | The customer's unique ID, resolved from the identifier submitted in the request. Populated regardless of which of id/mobile/email/externalId was actually sent. |
..mobile | string | The customer's mobile number, resolved the same way as id above. |
..email | string | The customer's email address, resolved the same way as id above. |
..externalId | string | The customer's external ID, resolved the same way as id above. |
..status | object | Object containing the outcome of the customer lookup. If lookup fails (for example, an unrecognized mobile number), this failure status is copied onto every one of this customer's partnerResumeStatus entries below and the resume does not run. |
...status | boolean | true if the customer was found, false otherwise. Check this before trusting partnerResumeStatus below. |
...message | string | Human-readable outcome message, for example "Cannot find customer for provided mobile/external-id/e-mail/id". |
...code | integer | Numeric status code for the lookup; 1000 indicates success. |
.resumePartnerPrograms | array | Echoes the subscriptions submitted for this customer, with a resume outcome attached to each. Check each entry, since one customer's programs can succeed or fail independently. |
..partnerProgramName | string | Echoes the partner program name that was submitted. |
..resumeType | enum | Echoes the resumeType that was submitted. |
..partnerResumeStatus | object | Object containing the outcome of the resume request for this subscription. Check this to confirm the resume actually took effect. |
...status | boolean | true if the resume succeeded, false otherwise. |
...message | string | Human-readable outcome message; "Success" on success, or the message from Error and warning codes on failure. |
...code | integer | Numeric status code; 200 indicates success. See Error and warning codes below for failure codes. |
warnings | array | Always empty for this endpoint. No current condition populates it. |
errors | array | Present only for a batch-level failure, for example exceeding the 50-customer limit. When present, no customer in the batch is processed. |
Error and warning codes
| Code | Error number | Type | Description |
|---|---|---|---|
ERR_PARTNER_PROGRAM | 2001 | Error | Generic failure processing the resume event. HTTP 200 with an error on the affected subscription's partnerResumeStatus. |
ERR_PARTNER_PROGRAM_FIELD | 2002 | Error | partnerProgramName is missing or empty. Set on the affected subscription's partnerResumeStatus. HTTP 200. |
ERR_PARTNER_PROGRAM_MAX_LIMIT_EXCEED | 2008 | Error | More than 50 customers in resumeCustomers. HTTP 200 with a top-level errors entry; no customer in the batch is processed. |
| — | 1012 | Error | Customer not found for the given id/mobile/email/externalId. Set on the customer's status, and copied onto every partnerResumeStatus for that customer. HTTP 200. |
ERR_INVALID_RESUME_TYPE | 2029 | Error | resumeType is missing or not one of MEMBER, AGENT, SYSTEM. HTTP 200. |
ERR_RESUME_SUBSCRIPTION_NOT_ACTIVE | 2035 | Error | The customer's subscription to partnerProgramName is not currently active, so it cannot be resumed. HTTP 200. |
ERR_SUBSCRIPTION_NOT_PAUSED | 2036 | Error | The subscription is not currently paused, so there is nothing to resume. HTTP 200. |
ERR_SUBSCRIPTION_CURRENTLY_PAUSED(2037) is not returned by this API. Other partner-program APIs return it when a member's subscription is currently paused. Call this Resume Subscription API first to clear the pause.
200Successful response
