attachments
Update an attachment
Changed onUpdate an attachment
patch/attachments/{attachmentId}
Request
- Base URLhttps://{your_organization_slug}.commercelayer.io/api
- URLhttps://{your_organization_slug}.commercelayer.io/api/attachments/{attachmentId}
- AuthHTTP bearer
Path parameters
attachmentIdstring required
The resource's id
Request body
Example request
{
"data": {
"id": "XAyRWNUzyN",
"attributes": {
"name": "DDT transport document",
"description": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"url": "https://s3.yourdomain.com/attachment.pdf",
"reference": "ANY-EXTERNAL-REFEFERNCE",
"reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN",
"metadata": {
"foo": "bar"
}
},
"relationships": {
"attachable": {
"data": {
"id": "XAyRWNUzyN",
"attributes": {
"number": 1234,
"name": "EU Market",
"code": "europe1",
"facebook_pixel_id": "1234567890",
"checkout_url": "https://checkout.yourbrand.com/:order_id",
"external_prices_url": "https://external_prices.yourbrand.com",
"external_order_validation_url": "https://external_validation.yourbrand.com",
"private": true,
"shipping_cost_cutoff": 3,
"disabled_at": "2018-01-01T12:00:00.000Z",
"shared_secret": "1c0994cc4e996e8c6ee56a2198f66f3c",
"external_includes": [
"order.line_item_options"
],
"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": {
"merchant": {
"data": {
"id": "XAyRWNUzyN"
}
},
"price_list": {
"data": {
"id": "XAyRWNUzyN"
}
},
"base_price_list": {
"data": {
"id": "XAyRWNUzyN"
}
},
"inventory_model": {
"data": {
"id": "XAyRWNUzyN"
}
},
"subscription_model": {
"data": {
"id": "XAyRWNUzyN"
}
},
"discount_engine": {
"data": {
"id": "XAyRWNUzyN"
}
},
"tax_calculator": {
"data": {
"id": "XAyRWNUzyN",
"attributes": {
"name": "Personal tax calculator",
"type": "avalara_accounts",
"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"
},
"username": "user@mydomain.com",
"company_code": "MYCOMPANY",
"commit_invoice": true,
"ddp": true,
"pass_tax_exemption_code": true
},
"relationships": {
"markets": {
"data": {
"id": "XAyRWNUzyN"
}
},
"attachments": {
"data": {
"id": "XAyRWNUzyN"
}
},
"events": {
"data": {
"id": "XAyRWNUzyN"
}
},
"event_stores": {
"data": {
"id": "XAyRWNUzyN"
}
},
"tax_categories": {
"data": {
"id": "XAyRWNUzyN"
}
}
}
}
},
"customer_group": {
"data": {
"id": "XAyRWNUzyN"
}
},
"geocoder": {
"data": {
"id": "XAyRWNUzyN"
}
},
"default_shipping_method": {
"data": {
"id": "XAyRWNUzyN"
}
},
"default_payment_method": {
"data": {
"id": "XAyRWNUzyN"
}
},
"stores": {
"data": {
"id": "XAyRWNUzyN"
}
},
"price_list_schedulers": {
"data": {
"id": "XAyRWNUzyN"
}
},
"order_validation_rules": {
"data": {
"id": "XAyRWNUzyN"
}
},
"attachments": {
"data": {
"id": "XAyRWNUzyN"
}
},
"event_stores": {
"data": {
"id": "XAyRWNUzyN"
}
}
}
}
}
}
}
}Response
The updated attachment object
Changes
- info
added the new optional request property
//////////////// - info
added the new optional request property
////////////////
- info
- 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