Polling Request
Endpoint Description
This endpoint Allow you to poll the new event updated without waiting triggered from webhook
get {baseUrl}/api/v1/document/poll?last_synced_at=2024-06-01T01:00:00
Content-Type: application/json
Authorization: "Bearer {access_token}"
Payload
Key | Required | Type | Description |
---|---|---|---|
last_synced_at | No | String | The date of the last synced or polled |
Success Response
Response data array of document where document object represe in below table
Key | Definition |
---|---|
document_id | The unique of document from CamInvoice |
updated_at | The udpated date of the document |
type | The type of polling document "SEND" or "RECEIVE" |
** As receive document_id
we can get document xml document via Download XML document
Error Response
HTTP status code: 401
Key | Definition |
---|---|
error | The error code indicating the nature of the failure. |
error_description | "Invalid client credentials" – Typically shown when authentication details are wrong. |
Example Usage
Here’s how you can use curl
to set up the webhook:
curl "{baseUrl}/api/v1/updated?last_synced_at=2024-06-01T01:00:00" \
-H "Content-Type: application/json" \
-H "Authorization: Basic {access_token}" \