Upload invoice for settlement
POST
/api/v1/settlements/{id}/invoice
const url = 'https://example.com/api/v1/settlements/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/invoice';const form = new FormData();form.append('file', 'file');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/settlements/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/invoice \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form file=@fileAuthorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string format: uuid
ID of the settlement whose invoice to upload
Request Body required
Section titled “Request Body required ” Media type multipart/form-data
object
file
required
string format: binary
Responses
Section titled “ Responses ”Invoice uploaded successfully
Invalid settlement state or billing mode
Media type application/json
object
error_code
required
string
message
required
string
Example
{ "error_code": "UNAUTHORIZED", "message": "Authentication credentials were not provided or are invalid."}Unauthorized
Media type application/json
object
error_code
required
string
message
required
string
Example
{ "error_code": "UNAUTHORIZED", "message": "Authentication credentials were not provided or are invalid."}Settlement not found
Media type application/json
object
error_code
required
string
message
required
string
Example
{ "error_code": "UNAUTHORIZED", "message": "Authentication credentials were not provided or are invalid."}Internal server error
Media type application/json
object
error_code
required
string
message
required
string
Example
{ "error_code": "UNAUTHORIZED", "message": "Authentication credentials were not provided or are invalid."}