Skip to main content
POST
Attach a receipt to a card account activity

Authorizations

x-api-key
string
header
required

Enter your API key

Headers

Idempotency-Key
string

A unique value for this attach, for example attach-{activityId}-{fileId}. Sending the same key and body again returns the first result. Reusing the key with a different body returns IDEMPOTENCY_KEY_REUSED.

Path Parameters

activityId
string
required

The activity's id, as returned by List card account activities.

Required string length: 1 - 255

Body

application/json
fileId
string<uuid>
required

The id of a file you uploaded with Upload a file. Its status must be ready.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$

Response

id
string<uuid>
required

The receipt ID. Use it to retrieve or delete the receipt on this card transaction.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
activityId
string
required

The id of the card transaction the receipt is attached to.

fileName
string
required

The file name. Spaces are replaced with _.

contentType
string
required

The file type, for example application/pdf.

createdAt
string<date-time>
required

When the receipt was added to the card transaction, in UTC.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$