Orders
Update expiration for an order
Orders
Update expiration for an order
POST
/
v1
/
orders
/
{id}
/
update_expiration
curl --request POST \
--url https://api.ongoody.com/v1/orders/{id}/update_expiration \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"expiration": "2022-02-01T00:00:00+0000"
}'
{
"id": "3e8b32bc-c36f-427c-81b8-305f973b24e2",
"status": "created",
"individual_gift_link": "https://gifts.ongoody.com/gift/JT3MBSOFYT1LWXYUPLLNUAJZ",
"recipient_first_name": "Michael",
"recipient_last_name": "Franci",
"recipient_email": "michael@ongoody.com",
"card_id": "c97ee09c-dd4c-4dc6-a969-3fd5984b0aaa",
"message": "Test Message",
"thank_you_note": null,
"view_count_recipient": 0,
"is_swapped": false,
"order_batch_id": "d7dcef78-a437-4471-aab8-ee7aeef169ea",
"expires_at": "2022-02-01T00:00:00Z",
"cart": {
"id": "6b998c1d-4556-49ac-85d2-601f0a9218d1",
"items": [
{
"id": "ef7100a2-4d6e-4c2f-b6e8-57b01944aa3a",
"quantity": 1,
"product": {
"id": "8fcfb97b-919e-44c7-895f-4cbb140841d8",
"name": "Cookies",
"brand": {
"id": "123c1762-a985-4442-aefc-0cc5ff6a56f2",
"name": "Cookie Company"
}
}
}
]
},
"shipments": [],
"amounts": {
"amount_product": 2000,
"amount_shipping": 500,
"amount_processing_fee": 0,
"amount_pre_tax_total": 2500,
"amount_tax": null,
"amount_total": null,
"amount_global_relay_cost": null
},
"sender": {
"first_name": "Test",
"last_name": "User",
"email": "15553408647@test.ongoody.com"
},
"workspace_id": "b511c448-5b2a-453e-b523-8e98c5a8dd32",
"workspace_name": "Test Team",
"original_cart": null,
"original_amounts": null,
"reference_id": "XZJGEPWNBQE3ARHTIZENH5NM",
"payment_link": null
}
Authorizations
Your Goody API key.
Path Parameters
id
Body
application/json
Response
200
application/json
Expiration updated
An individual order contains the gift link to be sent to the recipient (if applicable) and other information about the order.
curl --request POST \
--url https://api.ongoody.com/v1/orders/{id}/update_expiration \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"expiration": "2022-02-01T00:00:00+0000"
}'
{
"id": "3e8b32bc-c36f-427c-81b8-305f973b24e2",
"status": "created",
"individual_gift_link": "https://gifts.ongoody.com/gift/JT3MBSOFYT1LWXYUPLLNUAJZ",
"recipient_first_name": "Michael",
"recipient_last_name": "Franci",
"recipient_email": "michael@ongoody.com",
"card_id": "c97ee09c-dd4c-4dc6-a969-3fd5984b0aaa",
"message": "Test Message",
"thank_you_note": null,
"view_count_recipient": 0,
"is_swapped": false,
"order_batch_id": "d7dcef78-a437-4471-aab8-ee7aeef169ea",
"expires_at": "2022-02-01T00:00:00Z",
"cart": {
"id": "6b998c1d-4556-49ac-85d2-601f0a9218d1",
"items": [
{
"id": "ef7100a2-4d6e-4c2f-b6e8-57b01944aa3a",
"quantity": 1,
"product": {
"id": "8fcfb97b-919e-44c7-895f-4cbb140841d8",
"name": "Cookies",
"brand": {
"id": "123c1762-a985-4442-aefc-0cc5ff6a56f2",
"name": "Cookie Company"
}
}
}
]
},
"shipments": [],
"amounts": {
"amount_product": 2000,
"amount_shipping": 500,
"amount_processing_fee": 0,
"amount_pre_tax_total": 2500,
"amount_tax": null,
"amount_total": null,
"amount_global_relay_cost": null
},
"sender": {
"first_name": "Test",
"last_name": "User",
"email": "15553408647@test.ongoody.com"
},
"workspace_id": "b511c448-5b2a-453e-b523-8e98c5a8dd32",
"workspace_name": "Test Team",
"original_cart": null,
"original_amounts": null,
"reference_id": "XZJGEPWNBQE3ARHTIZENH5NM",
"payment_link": null
}