Expense Artifact API
Use this API to attach files to expense reports and expense lines.
Overview
Artifact is Coupa-speak for attachments. This API endpoint lets you attach files to expense reports and expense lines.
For attachments classified as a supported image type, the API supports downloading a preview (640x640) and thumbnail (128x128) version.
For attachments classified as a non-image file, the API supports downloading the original file (e.g pdf)
:style can have value of 'preview' or 'thumb' .. it allows a smaller size of image to be downloaded (only applies to artifacts of supported image types)
Actions
The Expense Artifacts API lets you:
Verb |
Path |
Action |
Description |
---|---|---|---|
POST |
|
create |
Create expense artifact |
POST |
|
create |
Create expense artifact |
GET |
|
image |
Query expense artifact image. |
GET |
|
image |
Query expense artifact image. |
GET |
|
index |
Query expense artifacts |
GET |
|
index |
Query expense artifacts |
GET |
|
index |
Query expense artifacts |
GET |
|
show |
Show expense artifact |
GET |
|
show |
Show expense artifact |
GET |
|
show |
Show expense artifact |
PUT |
|
update |
Update expense artifact |
PUT |
|
update |
Update expense artifact |
PUT |
|
update |
Update expense artifact |
PUT |
|
update_with_ocr_response |
Update expense artifact with OCR response. |
GET |
|
retrieves expense report attachments |
Response payload is a zip archive with folders for each expense line that has receipt attachments. When images have been converted to PDFs or when PDFs are digitally signed, then only those final receipt attachment files are included in the downloaded zip archive. Available with R29 and more recent. |
Elements
Element |
Description |
Req'd |
Unique |
Allowable Value |
In |
Out |
Data Type |
---|---|---|---|---|---|---|---|
created-at |
Automatically created by Coupa in the format YYYY-MM-DDTHH:MM:SS+HH:MMZ |
yes |
datetime |
||||
created-by |
User who created |
yes |
|||||
external-src-ref |
External system's unique identifier for transaction |
yes |
string(255) |
||||
id |
Coupa unique identifier |
yes |
integer |
||||
image-content-type |
image_content_type |
yes |
string(255) |
||||
image-file-name |
image_file_name |
yes |
string(255) |
||||
image-file-size |
image_file_size |
yes |
string(255) |
||||
image-rotation |
Image rotation angle |
yes |
yes |
integer |
|||
ocr-status |
OCR Status |
yes |
yes |
string(50) |
|||
source-content-type |
source_content_type |
yes |
string(255) |
||||
source-file-name |
source_file_name |
yes |
string(255) |
||||
source-file-size |
source_file_size |
yes |
string(255) |
||||
updated-at |
Automatically created by Coupa in the format YYYY-MM-DDTHH:MM:SS+HH:MMZ |
yes |
datetime |
||||
updated-by |
User who updated |
yes |
|||||
url |
External link to artifact |
yes |
string |
||||
digitization-status |
Digitization status |
yes |
string(25) |
||||
digitization-error |
Digitization error |
yes |
string |
||||
digitized-receipt-file-name |
Digitized receipt file name |
yes |
string(255) |
||||
digitized-receipt-content-type |
Digitized receipt content type |
yes |
string(255) |
||||
digitized-receipt-file-size |
Digitized receipt file size |
yes |
integer |