Unlink customer from a location

This API is used to remove a customer from one location.

It returns the unlinked customer and location. The customer, its other locations, saved payment methods and transaction history are kept. Creating the customer again in that location restores the link.

Note: location_id is required when the token covers more than one location.

URL

{{interface_url}}/{{version}}/customers/{{customer_id}}?location_id={{location_id}}

Method

DELETE

Headers

Authorization: Bearer {access_token} (or Api-Key)

Request Parameters

None.

URL Parameters

ParameterRequired/OptionalTypeDescription
customer_idRequiredIntegerOur customer ID (id returned by Create customer).
location_idConditionalIntegerLocation to unlink from. Required with a corporate / sub corporate token.

Example Request (cURL)

curl --location --request DELETE '{{interface_url}}/{{version}}/customers/{{customer_id}}?location_id={{location_id}}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{access_token}}'

Example Response (JSON) — 200

{
  "id": 48213,
  "location_id": 279685,
  "unlinked": true
}

Error Responses

Format: { "error": { "code", "name", "message", "details" } }

StatusErrorWhen
400missing_required_parameterslocation_id missing.
404customer_not_foundThe customer is not linked to that location.

Path Params
string
required
string
required
Query Params
string
Response

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here!