post
https://{host}/v2/partnerProgram/customerPartnerProgramUpdate
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
This API lets you update tier details for customers already linked to partner programs. You can upgrade, downgrade, or renew a customer's tier and set a new tier expiry date. You can also cancel a pending future-dated relinking for supplementary programs.
NoteThe customer must be linked to the partner program before using this API. Use the Link Customer to Partner Program API to link customers first.
Example request
curl --location 'https://eu.api.capillarytech.com/v2/partnerProgram/customerPartnerProgramUpdate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <YOUR_AUTH_TOKEN>' \
--data '{
"customersPartnerUpdates": [
{
"customer": {
"mobile": "919740000000",
"email": "",
"externalId": ""
},
"partnerProgramUpdates": [
{
"partnerProgramName": "Apparel-Partner",
"updateType": "UPGRADE",
"updateDetails": {
"updatedTierName": "Silver",
"updatedTierExpiryDate": "2027-12-29T23:59:59+05:30"
}
}
]
}
]
}'curl --location 'https://eu.api.capillarytech.com/v2/partnerProgram/customerPartnerProgramUpdate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <YOUR_AUTH_TOKEN>' \
--data '{
"customersPartnerUpdates": [
{
"customer": {
"mobile": "917800048833"
},
"partnerProgramUpdates": [
{
"partnerProgramName": "SPP_1",
"updateType": "MEMBERSHIP_RELINKING_CANCELLED"
}
]
}
]
}'Prerequisites
- Authentication: Basic or OAuth authentication
- Default access group
Resource information
| URI | /v2/partnerProgram/customerPartnerProgramUpdate |
| HTTP Method | POST |
| Pagination | No |
| Batch support | Yes (up to 50 customers per request) |
| Rate limit information | None |
Body parameters
| Field | Type | Required | Description |
|---|---|---|---|
| customersPartnerUpdates | Array | Yes | List of customer update requests. You can update tier details for multiple customers in a single request. |
| .customer | Object | Yes | Customer identification details. At least one identifier must be provided. |
| ..id | Integer | Conditional | Customer's internal Capillary ID. Any one identifier is required. |
| ..mobile | String | Conditional | Customer's mobile number. Any one identifier is required. |
| String | Conditional | Customer's email address. Any one identifier is required. | |
| ..externalId | String | Conditional | Customer's external identifier. Any one identifier is required. |
| .partnerProgramUpdates | Array | Yes | List of partner program tier updates for the customer. You can update multiple partner programs in a single request. |
| ..partnerProgramName | String | Yes | Name of the partner program. The customer must already be linked to this program. |
| ..updateType | String | Yes | Type of update to perform. Supported values: UPGRADE, DOWNGRADE, RENEW, MEMBERSHIP_RELINKING_CANCELLED, MEMBERSHIP_RENEWAL_INITIATION. Use MEMBERSHIP_RELINKING_CANCELLED to cancel a pending future-dated relink for a supplementary program before it is activated. MEMBERSHIP_RENEWAL_INITIATION is available only when ALLOW_MEMBERSHIP_RELINKING is disabled for the org; when it is enabled, use the Link Customer to Partner Program API with a future membershipStartDate instead. |
| ..updateDetails | Object | Conditional | Details of the tier update. Required for UPGRADE, DOWNGRADE, RENEW, and MEMBERSHIP_RENEWAL_INITIATION. Not required when updateType is MEMBERSHIP_RELINKING_CANCELLED. |
| ...updatedTierName | String | Yes | Name of the new tier to assign to the customer. The tier must exist in the partner program configuration. |
| ...updatedTierExpiryDate | String | Optional | Expiry date and time for the updated tier in ISO 8601 format. Must be a current or future date. Example: 2027-12-29T23:59:59+05:30. If not provided, the existing tier expiry date remains unchanged. |
API quick reference
POST /v2/partnerProgram/customerPartnerProgramUpdate
└─ customersPartnerUpdates (array, required)
└─ [customer update request]
├─ customer (object, required)
│ ├─ id (integer)
│ ├─ mobile (string)
│ ├─ email (string)
│ └─ externalId (string)
└─ partnerProgramUpdates (array, required)
└─ [partner program update]
├─ partnerProgramName (string, required)
├─ updateType (string, required: UPGRADE | DOWNGRADE | RENEW | MEMBERSHIP_RELINKING_CANCELLED | MEMBERSHIP_RENEWAL_INITIATION)
└─ updateDetails (object, required for UPGRADE | DOWNGRADE | RENEW | MEMBERSHIP_RENEWAL_INITIATION)
├─ updatedTierName (string, required)
└─ updatedTierExpiryDate (string, ISO 8601)
Example response
{
"customersPartnerUpdates": [
{
"customer": {
"id": 382741349,
"mobile": "916215000000",
"email": "[email protected]",
"externalId": "X916215000000",
"status": {
"status": true,
"message": "Customer successfully retrieved",
"code": 1000
}
},
"partnerProgramUpdates": [
{
"partnerProgramName": "1stProgram",
"updateType": "UPGRADE",
"updateStatus": {
"status": true,
"message": "Success",
"code": 200
}
}
]
}
],
"warnings": []
}Response parameters
| Field | Type | Description |
|---|---|---|
| customersPartnerUpdates | Array | List of customer update results. |
| .customer | Object | Customer identification details and retrieval status. |
| ..id | Integer | Customer's internal ID in Capillary. Example: 382741349 |
| ..mobile | String | Customer's mobile number. |
| String | Customer's email address. | |
| ..externalId | String | Customer's external identifier. |
| ..status | Object | Status of customer retrieval. |
| ...status | Boolean | Indicates success (true) or failure (false) of customer retrieval. |
| ...message | String | Message describing the retrieval result. Example: "Customer successfully retrieved" |
| ...code | Integer | Status code for the retrieval. 1000 indicates success. |
| .partnerProgramUpdates | Array | List of partner program update results. |
| ..partnerProgramName | String | Name of the partner program. Example: "1stProgram" |
| ..updateType | String | Type of update performed. Values: UPGRADE, DOWNGRADE, RENEW, MEMBERSHIP_RELINKING_CANCELLED, MEMBERSHIP_RENEWAL_INITIATION. |
| ..updateStatus | Object | Status of the partner program update. |
| ...status | Boolean | Indicates success (true) or failure (false) of the update. |
| ...message | String | Message describing the update result. Example: "Success" |
| ...code | Integer | Status code for the update. 200 indicates success. |
| warnings | Array | List of warning messages, if any. |
Error codes
| Code | Type | Description |
|---|---|---|
| 2002 | Error | Invalid Request: Cannot proceed if updateDetails, updatedTierName, or partnerProgramName is empty or null. Ensure all required fields are provided in the request. |
| 2003 | Error | Invalid Request: Partner tier expiry date should not be a past date. Set updatedTierExpiryDate to today's date or a future date. |
| 2004 | Error | Invalid Request: Link the customer with the partner program. The customer must be linked to the partner program before updating their tier. Use the Link Customer to Partner Program API first. |
| 2006 | Error | Invalid Request: Cannot find the partner program. Verify that partnerProgramName matches an existing partner program configured in your organization. |
| 2007 | Error | Invalid Request: Cannot find the partner program tier. Verify that updatedTierName matches a tier configured in the partner program. |
| 2008 | Error | Invalid Request: Cannot process if partner program limit is more than 50. The batch limit is 50 customers per request. Split your request into smaller batches. |
| 2009 | Error | Invalid Request: updateType supports only UPGRADE, DOWNGRADE, RENEW, MEMBERSHIP_RELINKING_CANCELLED, MEMBERSHIP_RENEWAL_INITIATION. Provide one of these values for the updateType field. |
| 2026 | Error | Membership relinking is not enabled for this organisation. The MEMBERSHIP_RELINKING_CANCELLED update type requires ALLOW_MEMBERSHIP_RELINKING to be enabled. To enable this, raise a JIRA ticket to the Capillary product support team. |
| 2027 | Error | No pending relinking found to cancel. There is no queued future-dated relink for this customer in the specified partner program. |
| 2028 | Error | Membership renewal via this API is not allowed for this organisation. Use the Link Customer to Partner Program API with a future membershipStartDate instead. Returned when updateType is MEMBERSHIP_RENEWAL_INITIATION and ALLOW_MEMBERSHIP_RELINKING is enabled for the org. |
