Create EGS Code Usage

API allow taxpayers to create their own codes in the system (EGS Codes).

ERP - Ping Search my EGS code usage requests

Overview

Create EGS Code Usage API is a way for taxpayer to register his own internal codes in the eInvicing solution.

Once taxpayer register his own internal code to the eInvoice solution, a request is raised and sent to ETA employees to approve this request.

Once ETA employee approve the request,then taxpayer can use this code in documents submissions

Note! when you are logged in as intermediary, permissions that are granted by the taxpayer will be applied on your profile and this will control the functionalities that you'll be able to executed on behalf of the taxpayer you are representing.

Signature

API is REST based API that receives that does not take any URL parameters.

Signature: POST /api/v1.0/codetypes/requests/codes

Inputs

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

Body of the request contains array named items that contains an object with the below properties:

Input parameter Type Description Value example
codeType String Refer to the catalog where this code will be generated, EGS catalog is mainly used by taxpayers to register their internal codes EGS
parentCode String The parent of the code, represents level 4 GPC code 10000051
itemCode String Refer to the internal code of the taxpayer that need to be registerd on eInvoicing solution, format for the code should follow the following standard “EG-TaxpayerID-InternalCode” EG-674859545-123456784
codeName String code name in English bottle of water
codeNameAr String code name in Arabic قارورة ماء
activeFrom Date The date and time when the code active. Time to be supplied in UTC timezone 2021-02-21T00:00:00Z
activeTo Date The date and time when the code will be inactive. Time to be supplied in UTC timezone (Optional) 2021-05-21T00:00:00Z
description String Description of code in English (Optional) Glass bottle
descriptionAr String Description of code in Arabic (Optional) قارورة زجاجية
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 code attributes provided:

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

Additional considerations

No additional considerations.