Update an event
How to update an existing event via API
Request
Arguments
Body Parameter
Type
Required
Example
curl -g -X PATCH \
'https://yourdomain.commercelayer.io/api/events/XAyRWNUzyN' \
-H 'Accept: application/vnd.api+json' \
-H 'Authorization: Bearer your-access-token' \
-H 'Content-Type: application/vnd.api+json' \
-d '{
"data": {
"type": "events",
"id": "xYZkjABcde",
"attributes": {
"reference": "ANY-EXTERNAL-REFEFERNCE"
}
}
}'{
"data": {
"id": "XAyRWNUzyN",
"type": "events",
"links": {
"self": "https://yourdomain.commercelayer.io/api/events/XAyRWNUzyN"
},
"attributes": {
"name": "orders.create",
"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": {
"webhooks": {
"links": {
"self": "https://yourdomain.commercelayer.io/api/events/XAyRWNUzyN/relationships/webhooks",
"related": "https://yourdomain.commercelayer.io/api/events/XAyRWNUzyN/webhooks"
}
},
"last_event_callbacks": {
"links": {
"self": "https://yourdomain.commercelayer.io/api/events/XAyRWNUzyN/relationships/last_event_callbacks",
"related": "https://yourdomain.commercelayer.io/api/events/XAyRWNUzyN/last_event_callbacks"
}
},
"event_stores": {
"links": {
"self": "https://yourdomain.commercelayer.io/api/events/XAyRWNUzyN/relationships/event_stores",
"related": "https://yourdomain.commercelayer.io/api/events/XAyRWNUzyN/event_stores"
}
}
},
"meta": {
"mode": "test",
"organization_id": "xRRkjDFafe",
"trace_id": "69abaa3545913c78132e5578bd26208d44aa9043647d78698fd0021f3958cd74"
}
}
}Last updated