Update Code

API responsible for Updating Publsihed Codes

Update EGS Code Usage Full Common API list

Overview

Update Code API is a way for taxpayer to Update his previous EGS publsihed and approved codes usage requests as long they are under ‘Approved’ state.

Signature

API is REST based API that receives the code type and item code through the URL parameter and payload to be changed in request body.

Signature: PUT /api/v1.0/codetypes/:codeType/codes/:itemCode

Inputs

This API accepts standard eInvoicing API header parameters for authenticated call.

Input parameter Type Description Value example
codeType String This codeType refer to the code type catalog that we need to search in, this could be either GS1 or EGS catalogs EGS
itemCode String Code that was registered by the taxpayer EG-113317713-1234

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

Input parameter Type Description Value example
codeDescriptionPrimaryLang String Code description In English (Optional) Water bottle, 600 mg, plastic bottle
codeDescriptionSecondaryLang String Code description In Arabic (Optional) قاروره مياه يلاستيكية
activeTo Date Refer to the code end of validaity date in UTC (Optional) 2021-05-21T23:59:00Z
linkedCode String EGS Related Code (Optional) EG-674859545-9875

Outputs

Successful Response

On a successful submission API returns 200 status code.

Error Response

Error situations are reported back by this API through the standard error response.

Additional specialized error messages can be returned as a result of validation of state of the document and caller:

HTTP Status Code Error Code Description
400 Bad request Returned when user is trying to update registration of non existing code registration
404 Not Fount Returned when parent code ID is not found.

Additional considerations

No additional considerations.