Cowdidocs
API ReferenceInvoice financing

Resubmit a rejected financing invoice

POST
/v1/financing/merchants/{merchantId}/invoices/{invoiceId}/resubmissions

The supplier's corrected submission of a rejected invoice. The invoice keeps its id and its number. The new figures and documents replace the submission, and the invoice moves back to PENDING. The deductions, the VAT and the rejection fields reset to null. details.previous_submissions records each earlier submission with its rejection, oldest first. A repeated request with the same figures returns the resubmitted invoice. Submit the saved details to Core after this call, with the same invoice number. Requires merchant:financing.invoices:write on the merchant.

AuthorizationBearer <token>

Create a client with POST /v1/oauth/clients, then exchange its credentials for an access token. AUTHORIZATION_CODE clients act on behalf of a signed-in user and always use PKCE; CLIENT_CREDENTIALS clients act as themselves. A client may only be granted scopes its creator already holds — read the grantable list from GET /v1/oauth/clients/scopes.

In: header

Path Parameters

merchantId*string

Canonical sales-app merchant id, shared with Core. Legacy ids remain readable.

Length1 <= length <= 255
invoiceId*string

Invoice id.

Formatuuid

Request Body

application/json

The corrected submission of a rejected invoice. The invoice keeps its number.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/financing/merchants/01JZQ5W7M5Y83M6F1D6E0A2K8N/invoices/550e8400-e29b-41d4-a716-446655440000/resubmissions" \  -H "Content-Type: application/json" \  -d '{    "invoice_amount": {      "value": 1,      "currency": "KES"    },    "due_date": "2019-08-24",    "document_ids": [      "80c9269b-2f78-48c9-a59b-d8e91723e86e"    ]  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6",  "attached_document_ids": [    "2daa2194-1f27-4d7b-a37c-8fc5cf0db85c"  ],  "deductions": [    {      "id": "string",      "kind": "VAT",      "label": "string",      "basis": "BASIS_POINTS",      "basis_points": 0    }  ],  "vat": {    "basis": "RATE",    "rate_basis_points": 1,    "paid": true  },  "rejection_reason": "DUPLICATE_INVOICE",  "rejection_note": "string",  "rejected_by": "string",  "rejected_at": "2019-08-24T14:15:22Z",  "amount_minor_units": 250000,  "currency": "KES",  "details": {    "property1": null,    "property2": null  },  "due_date": "2019-08-24",  "issued_date": "2019-08-24",  "status": "PENDING",  "created_at": "2019-08-24T14:15:22Z"}
{  "code": "INVALID_PARAMS",  "description": "user_id must be a UUID",  "identifier": "string",  "invalid_params": [    {      "path": "user_id",      "reason": "must be a UUID",      "sub_code": "string"    }  ]}
{  "code": "INVALID_PARAMS",  "description": "user_id must be a UUID",  "identifier": "string",  "invalid_params": [    {      "path": "user_id",      "reason": "must be a UUID",      "sub_code": "string"    }  ]}
{  "code": "INVALID_PARAMS",  "description": "user_id must be a UUID",  "identifier": "string",  "invalid_params": [    {      "path": "user_id",      "reason": "must be a UUID",      "sub_code": "string"    }  ]}
{  "code": "INVALID_PARAMS",  "description": "user_id must be a UUID",  "identifier": "string",  "invalid_params": [    {      "path": "user_id",      "reason": "must be a UUID",      "sub_code": "string"    }  ]}
{  "code": "INVALID_PARAMS",  "description": "user_id must be a UUID",  "identifier": "string",  "invalid_params": [    {      "path": "user_id",      "reason": "must be a UUID",      "sub_code": "string"    }  ]}
{  "code": "INVALID_PARAMS",  "description": "user_id must be a UUID",  "identifier": "string",  "invalid_params": [    {      "path": "user_id",      "reason": "must be a UUID",      "sub_code": "string"    }  ]}
{  "code": "INVALID_PARAMS",  "description": "user_id must be a UUID",  "identifier": "string",  "invalid_params": [    {      "path": "user_id",      "reason": "must be a UUID",      "sub_code": "string"    }  ]}