Update a customer subscription

PATCH https://{{subdomain}}.commercelayer.io/api/customer_subscriptions/{{customer_subscription_id}}

Request Body

{"data"=>{"type"=>"customer_subscriptions", "id"=>"{{customer_subscription_id}}", "attributes"=>{"reference"=>"{{customer_subscription_reference}}", "reference_origin"=>"{{customer_subscription_reference_origin}}", "metadata"=>"{{customer_subscription_metadata}}"}}}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Authorizationstring

RESPONSES

status: OK

{"data":{"id":"xYZkjABcde","type":"customer_subscriptions","links":{"self":"https://yourdomain.commercelayer.io/api/customer_subscriptions/xYZkjABcde"},"attributes":{"customer_email":"john@example.com","created_at":"2018-01-01T12:00:00.000Z","updated_at":"2018-01-01T12:00:00.000Z","reference":"ANY-EXTERNAL-REFEFERNCE","reference_origin":"ANY-EXTERNAL-REFEFERNCE-ORIGIN","metadata":{"foo":"bar"}},"relationships":{"customer":{"links":{"self":"https://yourdomain.commercelayer.io/api/customer_subscriptions/xYZkjABcde/relationships/customer","related":"https://yourdomain.commercelayer.io/api/customer_subscriptions/xYZkjABcde/customer"}},"events":{"links":{"self":"https://yourdomain.commercelayer.io/api/customer_subscriptions/xYZkjABcde/relationships/events","related":"https://yourdomain.commercelayer.io/api/customer_subscriptions/xYZkjABcde/events"}},"versions":{"links":{"self":"https://yourdomain.commercelayer.io/api/customer_subscriptions/xYZkjABcde/relationships/versions","related":"https://yourdomain.commercelayer.io/api/customer_subscriptions/xYZkjABcde/versions"}}},"meta":{"mode":"test"}}}