Create an attachment
How to create an attachment via API
To create a new attachment, send a POST
request to the /api/attachments
endpoint, passing the resource arguments in the request body.
Request
POST https://yourdomain.commercelayer.io/api/attachments
Arguments
Body Parameter | Type | Required |
---|---|---|
type |
| Required |
attributes.name |
| Required |
attributes.description |
| Optional |
attributes.url |
| Optional |
attributes.reference |
| Optional |
attributes.reference_origin |
| Optional |
attributes.metadata |
| Optional |
relationships.attachable |
| Required |
Example
The following request creates a new attachment:
Last updated