Sync submission API

API will fetch & sync the receipt status which are submitted before.

Batch submission API Search receipts API

Overview

This API will sync all the submitted status receipts which were submitted before. It will fetch all the submitted status receipts.

The process of synchronizing receipts will be as follows:
• The system will be regularly checking the status from the external submission API. It will capture the status(valid/invalid) and update the local receipts accordingly.
• If submission is invalid, system will get error info and store it locally.
• If submission is valid, system will mark receipts in the local storage as “synchronized”.
• If the toolkit is offline, the submission is cached until the internet connection is restored.

Signature

Signature: POST /toolkit/syncsubmission

Inputs

This API should accept these headers supplied by eInvoicing:

Header parameter Type Description Value example
version String toolkit version 1.0

Body of the request contains a single object that contains these fields:

Input parameter Type Description Value example
all Boolean true to accept for synching all the previously submitted receipts, false to set synching status for specific receipts true / false
submissionUuids[] String receipt submission uuid value 563ec0af-767a-46b0-a6ca-ce2f97d888c2, 9065fa84-e648-49f8-b33d-595b698db040

Outputs

On a successful submission, API must return 200 status code.

Upon successful submission, api will return submissions object with the below mentioned output parameters.

Output parameter Type Description Value example
submissions[] complex submissions array object contains the submission uuids which are synched.  
notFoundSubmissionUuids[] String notFoundSubmissionUuids array object  
correlationId String Correlation id of the successful sync events  
target String Success field information  
code String Success code 200 Ok / 201 Created etc.,
message String Success message  
details String Additional details  

submissions

Output parameter Type Description Value example
submissionUuid String uuid value of the submission 563ec0af-767a-46b0-a6ca-ce2f97d888c2
status String submission status. Submitted
receipts[] complex receipts array object of the submissions object  

receipts

Output parameter Type Description Value example
uuid String receipt uuid value 563ec0af-767a-46b0-a6ca-ce2f97d888c4
status String Current status of the reciept valid/invalid
errors[] complex error array object of the receipts object  

errors

Output parameter Type Description Value example
stepId String step id of the receipt errors object  
stepName String step name of the receipt errors object  
stepNameAr String step name argument the receipt errors object  
error complex error object of the receipt errors object  

error

Output parameter Type Description Value example
propertyPath String property path of the receipt error object  
errorCode String error code of the receipt error object  
error String error message of the receipt error object  
errorAr String error ar of the receipt error object  
metadata String meta data of the receipt error object  
innerError[] complex Inner error array object of the receipt error object  

innerError

Output parameter Type Description Value example
propertyPath String property path of the receipt inner error object  
errorCode String error code of the receipt inner error object  
error String error message of the receipt inner error object  
errorAr String error ar of the receipt inner error object  
metadata String meta data of the receipt inner error object  
innerError[] String Inner error array object of the receipt inner error object  

If 4xx or 5xx codes appeared as a result, It will be mentioned with the below error output parameters.

Output parameter Type Description Value example
correlationId String Correlation id of the error sync events  
target String Error occurred field information  
code String Error code bad request/invalid data etc.,
message String Error message  
details String Error additional details, useful for further investigation  

Additional considerations

This API is called only over protected HTTPS channel.