Update a gift card
Changed onUpdate a gift card
Request
- Base URLhttps://{your_organization_slug}.commercelayer.io/api
- URLhttps://{your_organization_slug}.commercelayer.io/api/gift_cards/{giftCardId}
- AuthHTTP bearer
Path parameters
The resource's id
Request body
Example request
{
"data": {
"id": "XAyRWNUzyN",
"attributes": {
"currency_code": "EUR",
"balance_cents": 15000,
"balance_max_cents": 100000,
"rechargeable": true,
"distribute_discount": true,
"image_url": "https://img.yourdomain.com/gift_cards/32db311a.png",
"expires_at": "2018-01-01T12:00:00.000Z",
"recipient_email": "john@example.com",
"_purchase": true,
"_activate": true,
"_deactivate": true,
"_balance_change_cents": -5000,
"reference": "ANY-EXTERNAL-REFEFERNCE",
"reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN",
"metadata": {
"foo": "bar"
}
},
"relationships": {
"market": {
"data": {
"id": "XAyRWNUzyN"
}
},
"gift_card_recipient": {
"data": {
"id": "XAyRWNUzyN"
}
},
"tags": {
"data": {
"id": "XAyRWNUzyN"
}
}
}
}
}Response
The updated gift card object
Changes
- breaking
added the new required request property
/// - breaking
added the new required request property
/// - breaking
request property
/was restricted to a list of enum values - breaking
the
//request property type changed fromstringtointegernull - warning
removed the request property
/// - warning
removed the request property
/// - warning
removed the request property
/// - warning
removed the request property
/// - info
added the new optional request property
// - info
added the new optional request property
// - info
added the new optional request property
// - info
added the new optional request property
// - info
the request property
//became nullable - info
the request property
//became nullable - info
the request property
//became nullable - info
the request property
//became nullable - info
the request property
//became nullable - info
the request property
//became nullable - info
the request property
//became nullable - info
the request property
//became nullable - info
the
request property default valuegift_cardswas removed - info
added the new
gift_cardsenum value to the request property/ - info
added the media type
application/vnd.api+jsonfor the response with the status
- breaking