Retrieve an attachment

Retrieves an attachment with a specified ID.

SecuritySecretApiKey or JWT
Request
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

ID of the resource.

Responses
200

Attachment retrieved.

Response Schema: application/json
fileId
required
string

ID of the linked file object.

relatedId
required
string

ID of the linked object.

relatedType
required
string

Linked object type.

Enum: "customer" "customer-timeline-comment" "customer-edd-timeline-comment" "dispute" "gateway-timeline-comment" "invoice" "invoice-timeline-comment" "order-timeline-comment" "organization" "payment" … 5 more
id
string <= 50 characters

Unique resource ID. Defaults to UUID v4.

name
string

Name of original attachment.

description
string

Description of the attachment.

createdTime
string <date-time> (CreatedTime)

Date and time which is set automatically when the resource is created.

updatedTime
string <date-time> (UpdatedTime)

Date and time which updates automatically when the resource is updated.

Array of objects

Related links.

Array
href
string

Link URL.

rel
string

Type of link.

Enum: "self" "file"
object

Embedded objects that are requested by the expand query parameter.

file
object
401

Unauthorized access. Invalid credentials used.

403

Access forbidden.

404

Resource not found.

get/attachments/{id}
Request samples
$attachment = $client->attachments()->load('attachmentId');
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "fileId": "string",
  • "relatedType": "customer",
  • "relatedId": "string",
  • "name": "string",
  • "description": "string",
  • "createdTime": "2019-08-24T14:15:22Z",
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "_links": [
    ],
  • "_embedded": {
    }
}