Update Customer Tier

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

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.

📘

Note

The 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 MethodPOST
PaginationNo
Batch supportYes (up to 50 customers per request)
Rate limit informationNone

Body parameters

FieldTypeRequiredDescription
customersPartnerUpdatesArrayYesList of customer update requests. You can update tier details for multiple customers in a single request.
.customerObjectYesCustomer identification details. At least one identifier must be provided.
..idIntegerConditionalCustomer's internal Capillary ID. Any one identifier is required.
..mobileStringConditionalCustomer's mobile number. Any one identifier is required.
..emailStringConditionalCustomer's email address. Any one identifier is required.
..externalIdStringConditionalCustomer's external identifier. Any one identifier is required.
.partnerProgramUpdatesArrayYesList of partner program tier updates for the customer. You can update multiple partner programs in a single request.
..partnerProgramNameStringYesName of the partner program. The customer must already be linked to this program.
..updateTypeStringYesType 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.
..updateDetailsObjectConditionalDetails of the tier update. Required for UPGRADE, DOWNGRADE, RENEW, and MEMBERSHIP_RENEWAL_INITIATION. Not required when updateType is MEMBERSHIP_RELINKING_CANCELLED.
...updatedTierNameStringYesName of the new tier to assign to the customer. The tier must exist in the partner program configuration.
...updatedTierExpiryDateStringOptionalExpiry 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

FieldTypeDescription
customersPartnerUpdatesArrayList of customer update results.
.customerObjectCustomer identification details and retrieval status.
..idIntegerCustomer's internal ID in Capillary. Example: 382741349
..mobileStringCustomer's mobile number.
..emailStringCustomer's email address.
..externalIdStringCustomer's external identifier.
..statusObjectStatus of customer retrieval.
...statusBooleanIndicates success (true) or failure (false) of customer retrieval.
...messageStringMessage describing the retrieval result. Example: "Customer successfully retrieved"
...codeIntegerStatus code for the retrieval. 1000 indicates success.
.partnerProgramUpdatesArrayList of partner program update results.
..partnerProgramNameStringName of the partner program. Example: "1stProgram"
..updateTypeStringType of update performed. Values: UPGRADE, DOWNGRADE, RENEW, MEMBERSHIP_RELINKING_CANCELLED, MEMBERSHIP_RENEWAL_INITIATION.
..updateStatusObjectStatus of the partner program update.
...statusBooleanIndicates success (true) or failure (false) of the update.
...messageStringMessage describing the update result. Example: "Success"
...codeIntegerStatus code for the update. 200 indicates success.
warningsArrayList of warning messages, if any.

Error codes

CodeTypeDescription
2002ErrorInvalid Request: Cannot proceed if updateDetails, updatedTierName, or partnerProgramName is empty or null. Ensure all required fields are provided in the request.
2003ErrorInvalid Request: Partner tier expiry date should not be a past date. Set updatedTierExpiryDate to today's date or a future date.
2004ErrorInvalid 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.
2006ErrorInvalid Request: Cannot find the partner program. Verify that partnerProgramName matches an existing partner program configured in your organization.
2007ErrorInvalid Request: Cannot find the partner program tier. Verify that updatedTierName matches a tier configured in the partner program.
2008ErrorInvalid 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.
2009ErrorInvalid Request: updateType supports only UPGRADE, DOWNGRADE, RENEW, MEMBERSHIP_RELINKING_CANCELLED, MEMBERSHIP_RENEWAL_INITIATION. Provide one of these values for the updateType field.
2026ErrorMembership 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.
2027ErrorNo pending relinking found to cancel. There is no queued future-dated relink for this customer in the specified partner program.
2028ErrorMembership 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.
Body Params
linkCustomers
object
Responses

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json