Skip to main content

 

 

Coupa Success Portal

Expense Artifact API

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 /api/expense_reports/:expense_report_id/expense_lines/
:expense_line_id/expense_artifacts
create Create expense artifact
POST /api/expense_lines/:expense_line_id/expense_artifacts create Create expense artifact
GET /api/expense_reports/:expense_report_id/expense_lines/
:expense_line_id/expense_artifacts/:id/image(/:style)
image Query expense artifact image. :style is optional and can be  preview' or thumb in order to fetch a smaller version of the image.
GET /api/expense_lines/:expense_line_id/expense_artifacts/:id
/image(/:style)
image Query expense artifact image. :style is optional and can be  preview' or thumb in order to fetch a smaller version of the image.
GET /api/expense_reports/:expense_report_id/expense_lines/
:expense_line_id/expense_artifacts
index Query expense artifacts
GET /api/expense_lines/expense_artifacts index Query expense artifacts
GET /api/expense_lines/:expense_line_id/expense_artifacts index Query expense artifacts
GET /api/expense_reports/:expense_report_id/expense_lines/
:expense_line_id/expense_artifacts/:id
show Show expense artifact
GET /api/expense_lines/expense_artifacts/:id show Show expense artifact
GET /api/expense_lines/:expense_line_id/expense_artifacts/
:id
show Show expense artifact
PUT /api/expense_reports/:expense_report_id/expense_lines/
:expense_line_id/expense_artifacts/:id
update Update expense artifact
PUT /api/expense_lines/expense_artifacts/:id update Update expense artifact
PUT /api/expense_lines/:expense_line_id/expense_artifacts/
:id
update Update expense artifact
PUT /api/expense_lines/expense_artifacts/:id/
update_with_ocr_response
update_with_ocr_response Update expense artifact with OCR response.

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 User 
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)
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 User  
url External link to artifact         yes string

 

  • Was this article helpful?