# Overview
Update EGS Code Usage API is a way for taxpayer to Update his previous code usage requests as long they are under ‘Submitted’ state
# Signature
API is REST based API that receives the code Usage Request Id through the URL parameter and payload to be changed in request body.
Signature:
PUT /api/v1.0/codetypes/requests/codes/:codeUsageRequestId
# Inputs
This API accepts standard eInvoicing API header parameters for authenticated call.
URL parameter | Type | Description | Value example |
---|---|---|---|
codeUsageRequestId | Numeric | Internal ID of the code usage request submitted | 55869 |
Body of the request contains a single object that contains these fields:
Input parameter | Type | Description | Value example |
---|---|---|---|
itemCode | String | Code that was registered by the taxpayer | EG-113317713-1234 |
codeName | String | Code name in English | water bottle |
codeNameAr | String | Code name in Arabic | قارورة مياه |
activeFrom | Date | Refer to the code start validity date in UTC | 2021-03-21T00:00:00Z |
activeTo | Date | Refer to the code end of validaity date in UTC (Optional) | 2021-05-21T23:59:00Z |
description | String | Code description that was provided by the taxpayer In English (Optional) | Water bottle, 600 mg, plastic bottle |
descriptionAr | String | Code description that was provided by the taxpayer In Arabic (Optional) | قاروره مياه يلاستيكية |
parentCode | String | The parent of the code, represents level 4 GPC code | 10005668 |
requestReason | String | Textual reason why the code is requested (Optional) | New product line item |
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.