Chilkat Online Tools

SQL Server / Egyptian eInvoicing SDK R1.5 / 1.1 Submit Documents (JSON)

Back to Collection Items

-- Important: See this note about string length limitations for strings returned by sp_OAMethod calls.
--
CREATE PROCEDURE ChilkatSample
AS
BEGIN
    DECLARE @hr int
    DECLARE @iTmp0 int
    -- Important: Do not use nvarchar(max).  See the warning about using nvarchar(max).
    DECLARE @sTmp0 nvarchar(4000)
    -- This example assumes the Chilkat API to have been previously unlocked.
    -- See Global Unlock Sample for sample code.

    DECLARE @http int
    -- Use "Chilkat_9_5_0.Http" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.Http', @http OUT
    IF @hr <> 0
    BEGIN
        PRINT 'Failed to create ActiveX component'
        RETURN
    END

    DECLARE @success int

    -- Use this online tool to generate code from sample JSON: Generate Code to Create JSON

    -- The following JSON is sent in the request body.

    -- {
    --   "documents": [
    --     {
    --       "issuer": {
    --         "address": {
    --           "branchID": "0",
    --           "country": "EG",
    --           "governate": "Cairo",
    --           "regionCity": "Nasr City",
    --           "street": "580 Clementina Key",
    --           "buildingNumber": "Bldg. 0",
    --           "postalCode": "68030",
    --           "floor": "1",
    --           "room": "123",
    --           "landmark": "7660 Melody Trail",
    --           "additionalInformation": "beside Townhall"
    --         },
    --         "type": "B",
    --         "id": "674859545",
    --         "name": "Issuer Company"
    --       },
    --       "receiver": {
    --         "address": {
    --           "country": "EG",
    --           "governate": "Egypt",
    --           "regionCity": "Mufazat al Ismlyah",
    --           "street": "580 Clementina Key",
    --           "buildingNumber": "Bldg. 0",
    --           "postalCode": "68030",
    --           "floor": "1",
    --           "room": "123",
    --           "landmark": "7660 Melody Trail",
    --           "additionalInformation": "beside Townhall"
    --         },
    --         "type": "B",
    --         "id": "313717919",
    --         "name": "Receiver"
    --       },
    --       "documentType": "I",
    --       "documentTypeVersion": "0.9",
    --       "dateTimeIssued": "2021-02-07T02:04:45Z",
    --       "taxpayerActivityCode": "4620",
    --       "internalID": "IID1",
    --       "purchaseOrderReference": "P-233-A6375",
    --       "purchaseOrderDescription": "purchase Order description",
    --       "salesOrderReference": "1231",
    --       "salesOrderDescription": "Sales Order description",
    --       "proformaInvoiceNumber": "SomeValue",
    --       "payment": {
    --         "bankName": "SomeValue",
    --         "bankAddress": "SomeValue",
    --         "bankAccountNo": "SomeValue",
    --         "bankAccountIBAN": "",
    --         "swiftCode": "",
    --         "terms": "SomeValue"
    --       },
    --       "delivery": {
    --         "approach": "SomeValue",
    --         "packaging": "SomeValue",
    --         "dateValidity": "2020-09-28T09:30:10Z",
    --         "exportPort": "SomeValue",
    --         "grossWeight": 10.50,
    --         "netWeight": 20.50,
    --         "terms": "SomeValue"
    --       },
    --       "invoiceLines": [
    --         {
    --           "description": "Computer1",
    --           "itemType": "EGS",
    --           "itemCode": "EG-113317713-123456",
    --           "unitType": "EA",
    --           "quantity": 1,
    --           "internalCode": "IC0",
    --           "salesTotal": 111111111111.00,
    --           "total": 111111111111.00,
    --           "valueDifference": 0.00,
    --           "totalTaxableFees": 0,
    --           "netTotal": 111111111111,
    --           "itemsDiscount": 0,
    --           "unitValue": {
    --             "currencySold": "EGP",
    --             "amountEGP": 111111111111.00
    --           },
    --           "discount": {
    --             "rate": 0,
    --             "amount": 0
    --           },
    --           "taxableItems": [
    --             {
    --               "taxType": "T1",
    --               "amount": 0,
    --               "subType": "V001",
    --               "rate": 0
    --             }
    --           ]
    --         },
    --         {
    --           "description": "Computer1",
    --           "itemType": "EGS",
    --           "itemCode": "EG-113317713-123456",
    --           "unitType": "EA",
    --           "quantity": 1,
    --           "internalCode": "IC0",
    --           "salesTotal": 111111111111.00,
    --           "total": 111111111111.00,
    --           "valueDifference": 0.00,
    --           "totalTaxableFees": 0,
    --           "netTotal": 111111111111,
    --           "itemsDiscount": 0,
    --           "unitValue": {
    --             "currencySold": "EGP",
    --             "amountEGP": 111111111111.00
    --           },
    --           "discount": {
    --             "rate": 0,
    --             "amount": 0
    --           },
    --           "taxableItems": [
    --             {
    --               "taxType": "T1",
    --               "amount": 0,
    --               "subType": "V001",
    --               "rate": 0
    --             }
    --           ]
    --         },
    --         {
    --           "description": "Computer1",
    --           "itemType": "EGS",
    --           "itemCode": "EG-113317713-123456",
    --           "unitType": "EA",
    --           "quantity": 1,
    --           "internalCode": "IC0",
    --           "salesTotal": 111111111111.00,
    --           "total": 111111111111.00,
    --           "valueDifference": 0.00,
    --           "totalTaxableFees": 0,
    --           "netTotal": 111111111111,
    --           "itemsDiscount": 0,
    --           "unitValue": {
    --             "currencySold": "EGP",
    --             "amountEGP": 111111111111.00
    --           },
    --           "discount": {
    --             "rate": 0,
    --             "amount": 0
    --           },
    --           "taxableItems": [
    --             {
    --               "taxType": "T1",
    --               "amount": 0,
    --               "subType": "V001",
    --               "rate": 0
    --             }
    --           ]
    --         },
    --         {
    --           "description": "Computer1",
    --           "itemType": "EGS",
    --           "itemCode": "EG-113317713-123456",
    --           "unitType": "EA",
    --           "quantity": 1,
    --           "internalCode": "IC0",
    --           "salesTotal": 111111111111.00,
    --           "total": 111111111111.00,
    --           "valueDifference": 0.00,
    --           "totalTaxableFees": 0,
    --           "netTotal": 111111111111,
    --           "itemsDiscount": 0,
    --           "unitValue": {
    --             "currencySold": "EGP",
    --             "amountEGP": 111111111111.00
    --           },
    --           "discount": {
    --             "rate": 0,
    --             "amount": 0
    --           },
    --           "taxableItems": [
    --             {
    --               "taxType": "T1",
    --               "amount": 0,
    --               "subType": "V001",
    --               "rate": 0
    --             }
    --           ]
    --         },
    --         {
    --           "description": "Computer1",
    --           "itemType": "EGS",
    --           "itemCode": "EG-113317713-123456",
    --           "unitType": "EA",
    --           "quantity": 1,
    --           "internalCode": "IC0",
    --           "salesTotal": 111111111111.00,
    --           "total": 111111111111.00,
    --           "valueDifference": 0.00,
    --           "totalTaxableFees": 0,
    --           "netTotal": 111111111111,
    --           "itemsDiscount": 0,
    --           "unitValue": {
    --             "currencySold": "EGP",
    --             "amountEGP": 111111111111.00
    --           },
    --           "discount": {
    --             "rate": 0,
    --             "amount": 0
    --           },
    --           "taxableItems": [
    --             {
    --               "taxType": "T1",
    --               "amount": 0,
    --               "subType": "V001",
    --               "rate": 0
    --             }
    --           ]
    --         }
    --       ],
    --       "totalDiscountAmount": 0,
    --       "totalSalesAmount": 555555555555.00,
    --       "netAmount": 555555555555.00,
    --       "taxTotals": [
    --         {
    --           "taxType": "T1",
    --           "amount": 0
    --         }
    --       ],
    --       "totalAmount": 555555555555.00,
    --       "extraDiscountAmount": 0,
    --       "totalItemsDiscountAmount": 0,
    --       "signatures": [
    --         {
    --           "signatureType": "I",
    --           "value": "MIIGywYJKoZIhvcNAQcCoIIGvDCCBrgCAQMxDTALBglghkgBZQMEAgEwCwYJKoZIhvcNAQcFoIID/zCCA/swggLjoAMCAQICEEFkOqRVlVar0F0n3FZOLiIwDQYJKoZIhvcNAQELBQAwSTELMAkGA1UEBhMCRUcxFDASBgNVBAoTC0VneXB0IFRydXN0MSQwIgYDVQQDExtFZ3lwdCBUcnVzdCBDb3Jwb3JhdGUgQ0EgRzIwHhcNMjAwMzMxMDAwMDAwWhcNMjEwMzMwMjM1OTU5WjBgMRUwEwYDVQQKFAxFZ3lwdCBUcnVzdCAxGDAWBgNVBGEUD1ZBVEVHLTExMzMxNzcxMzELMAkGA1UEBhMCRUcxIDAeBgNVBAMMF1Rlc3QgU2VhbGluZyBEZW1vIHVzZXIyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApmVGVJtpImeq\u002BtIJiVWSkIEEOTIcnG1XNYQOYtf5\u002BDg9eF5H5x1wkgR2G7dvWVXrTsdNv2Q\u002Bgvml9SdfWxlYxaljg2AuBrsHFjYVEAQFI37EW2K7tbMT7bfxwT1M5tbjxnkTTK12cgwxPr2LBNhHpfXp8SNyWCxpk6eyJb87DveVwCLbAGGXO9mhDj62glVTrCFit7mHC6bZ6MOMAp013B8No9c8xnrKQiOb4Tm2GxBYHFwEcfYUGZNltGZNdVUtu6ty\u002BNTrSRRC/dILeGHgz6/2pgQPk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YswgYgwgYUEIAJA8uO/ek3l9i3ZOgRtPhGWwwFYljbeJ7yAgEnyYNCWMGEwTaBLMEkxCzAJBgNVBAYTAkVHMRQwEgYDVQQKEwtFZ3lwdCBUcnVzdDEkMCIGA1UEAxMbRWd5cHQgVHJ1c3QgQ29ycG9yYXRlIENBIEcyAhBBZDqkVZVWq9BdJ9xWTi4iMAsGCSqGSIb3DQEBAQSCAQB13E1WX\u002BzbWppfJi3DBK9MMSB1TXuxcNkGXQ19OcRUUAaAe2K\u002BisobYrUCZbi3ygc2AWOMyafboxjjomzrnvXKrFgspT4wAFPYaAGFzKWq\u002BW/nqMhIqJVIpS/NM7Al4HvuBA5iGuZEQFusElB0yIxOIiYDI4v8Ilkff4/duj/V2CNaN5cqXLOpL5RP6Y5i\u002BVsPGb89t/L0dSIldGN0JqaqarqYo5/RwsUFJJq01DFpPGNbOIX3gSCDmycfhJPS9csnne9Zt\u002BabNpja5ZR6KA8JMe4DHes7FDZqHBNHdC\u002BRDXT4crqmnyiJjizULu6MqDc0Fv3vrMMWDLRlwDecgq7i"
    --         }
    --       ]
    --     }
    --   ]
    -- }

    DECLARE @json int
    -- Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.JsonObject', @json OUT

    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].issuer.address.branchID', '0'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].issuer.address.country', 'EG'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].issuer.address.governate', 'Cairo'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].issuer.address.regionCity', 'Nasr City'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].issuer.address.street', '580 Clementina Key'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].issuer.address.buildingNumber', 'Bldg. 0'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].issuer.address.postalCode', '68030'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].issuer.address.floor', '1'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].issuer.address.room', '123'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].issuer.address.landmark', '7660 Melody Trail'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].issuer.address.additionalInformation', 'beside Townhall'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].issuer.type', 'B'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].issuer.id', '674859545'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].issuer.name', 'Issuer Company'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].receiver.address.country', 'EG'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].receiver.address.governate', 'Egypt'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].receiver.address.regionCity', 'Mufazat al Ismlyah'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].receiver.address.street', '580 Clementina Key'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].receiver.address.buildingNumber', 'Bldg. 0'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].receiver.address.postalCode', '68030'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].receiver.address.floor', '1'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].receiver.address.room', '123'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].receiver.address.landmark', '7660 Melody Trail'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].receiver.address.additionalInformation', 'beside Townhall'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].receiver.type', 'B'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].receiver.id', '313717919'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].receiver.name', 'Receiver'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].documentType', 'I'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].documentTypeVersion', '0.9'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].dateTimeIssued', '2021-02-07T02:04:45Z'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].taxpayerActivityCode', '4620'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].internalID', 'IID1'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].purchaseOrderReference', 'P-233-A6375'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].purchaseOrderDescription', 'purchase Order description'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].salesOrderReference', '1231'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].salesOrderDescription', 'Sales Order description'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].proformaInvoiceNumber', 'SomeValue'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].payment.bankName', 'SomeValue'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].payment.bankAddress', 'SomeValue'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].payment.bankAccountNo', 'SomeValue'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].payment.bankAccountIBAN', ''
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].payment.swiftCode', ''
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].payment.terms', 'SomeValue'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].delivery.approach', 'SomeValue'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].delivery.packaging', 'SomeValue'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].delivery.dateValidity', '2020-09-28T09:30:10Z'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].delivery.exportPort', 'SomeValue'
    EXEC sp_OAMethod @json, 'UpdateNumber', @success OUT, 'documents[0].delivery.grossWeight', '10.50'
    EXEC sp_OAMethod @json, 'UpdateNumber', @success OUT, 'documents[0].delivery.netWeight', '20.50'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].delivery.terms', 'SomeValue'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[0].description', 'Computer1'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[0].itemType', 'EGS'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[0].itemCode', 'EG-113317713-123456'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[0].unitType', 'EA'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[0].quantity', 1
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[0].internalCode', 'IC0'
    EXEC sp_OAMethod @json, 'UpdateNumber', @success OUT, 'documents[0].invoiceLines[0].salesTotal', '111111111111.00'
    EXEC sp_OAMethod @json, 'UpdateNumber', @success OUT, 'documents[0].invoiceLines[0].total', '111111111111.00'
    EXEC sp_OAMethod @json, 'UpdateNumber', @success OUT, 'documents[0].invoiceLines[0].valueDifference', '0.00'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[0].totalTaxableFees', 0
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[0].netTotal', 123
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[0].itemsDiscount', 0
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[0].unitValue.currencySold', 'EGP'
    EXEC sp_OAMethod @json, 'UpdateNumber', @success OUT, 'documents[0].invoiceLines[0].unitValue.amountEGP', '111111111111.00'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[0].discount.rate', 0
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[0].discount.amount', 0
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[0].taxableItems[0].taxType', 'T1'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[0].taxableItems[0].amount', 0
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[0].taxableItems[0].subType', 'V001'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[0].taxableItems[0].rate', 0
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[1].description', 'Computer1'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[1].itemType', 'EGS'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[1].itemCode', 'EG-113317713-123456'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[1].unitType', 'EA'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[1].quantity', 1
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[1].internalCode', 'IC0'
    EXEC sp_OAMethod @json, 'UpdateNumber', @success OUT, 'documents[0].invoiceLines[1].salesTotal', '111111111111.00'
    EXEC sp_OAMethod @json, 'UpdateNumber', @success OUT, 'documents[0].invoiceLines[1].total', '111111111111.00'
    EXEC sp_OAMethod @json, 'UpdateNumber', @success OUT, 'documents[0].invoiceLines[1].valueDifference', '0.00'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[1].totalTaxableFees', 0
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[1].netTotal', 123
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[1].itemsDiscount', 0
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[1].unitValue.currencySold', 'EGP'
    EXEC sp_OAMethod @json, 'UpdateNumber', @success OUT, 'documents[0].invoiceLines[1].unitValue.amountEGP', '111111111111.00'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[1].discount.rate', 0
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[1].discount.amount', 0
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[1].taxableItems[0].taxType', 'T1'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[1].taxableItems[0].amount', 0
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[1].taxableItems[0].subType', 'V001'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[1].taxableItems[0].rate', 0
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[2].description', 'Computer1'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[2].itemType', 'EGS'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[2].itemCode', 'EG-113317713-123456'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[2].unitType', 'EA'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[2].quantity', 1
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[2].internalCode', 'IC0'
    EXEC sp_OAMethod @json, 'UpdateNumber', @success OUT, 'documents[0].invoiceLines[2].salesTotal', '111111111111.00'
    EXEC sp_OAMethod @json, 'UpdateNumber', @success OUT, 'documents[0].invoiceLines[2].total', '111111111111.00'
    EXEC sp_OAMethod @json, 'UpdateNumber', @success OUT, 'documents[0].invoiceLines[2].valueDifference', '0.00'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[2].totalTaxableFees', 0
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[2].netTotal', 123
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[2].itemsDiscount', 0
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[2].unitValue.currencySold', 'EGP'
    EXEC sp_OAMethod @json, 'UpdateNumber', @success OUT, 'documents[0].invoiceLines[2].unitValue.amountEGP', '111111111111.00'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[2].discount.rate', 0
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[2].discount.amount', 0
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[2].taxableItems[0].taxType', 'T1'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[2].taxableItems[0].amount', 0
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[2].taxableItems[0].subType', 'V001'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[2].taxableItems[0].rate', 0
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[3].description', 'Computer1'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[3].itemType', 'EGS'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[3].itemCode', 'EG-113317713-123456'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[3].unitType', 'EA'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[3].quantity', 1
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[3].internalCode', 'IC0'
    EXEC sp_OAMethod @json, 'UpdateNumber', @success OUT, 'documents[0].invoiceLines[3].salesTotal', '111111111111.00'
    EXEC sp_OAMethod @json, 'UpdateNumber', @success OUT, 'documents[0].invoiceLines[3].total', '111111111111.00'
    EXEC sp_OAMethod @json, 'UpdateNumber', @success OUT, 'documents[0].invoiceLines[3].valueDifference', '0.00'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[3].totalTaxableFees', 0
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[3].netTotal', 123
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[3].itemsDiscount', 0
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[3].unitValue.currencySold', 'EGP'
    EXEC sp_OAMethod @json, 'UpdateNumber', @success OUT, 'documents[0].invoiceLines[3].unitValue.amountEGP', '111111111111.00'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[3].discount.rate', 0
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[3].discount.amount', 0
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[3].taxableItems[0].taxType', 'T1'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[3].taxableItems[0].amount', 0
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[3].taxableItems[0].subType', 'V001'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[3].taxableItems[0].rate', 0
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[4].description', 'Computer1'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[4].itemType', 'EGS'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[4].itemCode', 'EG-113317713-123456'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[4].unitType', 'EA'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[4].quantity', 1
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[4].internalCode', 'IC0'
    EXEC sp_OAMethod @json, 'UpdateNumber', @success OUT, 'documents[0].invoiceLines[4].salesTotal', '111111111111.00'
    EXEC sp_OAMethod @json, 'UpdateNumber', @success OUT, 'documents[0].invoiceLines[4].total', '111111111111.00'
    EXEC sp_OAMethod @json, 'UpdateNumber', @success OUT, 'documents[0].invoiceLines[4].valueDifference', '0.00'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[4].totalTaxableFees', 0
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[4].netTotal', 123
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[4].itemsDiscount', 0
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[4].unitValue.currencySold', 'EGP'
    EXEC sp_OAMethod @json, 'UpdateNumber', @success OUT, 'documents[0].invoiceLines[4].unitValue.amountEGP', '111111111111.00'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[4].discount.rate', 0
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[4].discount.amount', 0
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[4].taxableItems[0].taxType', 'T1'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[4].taxableItems[0].amount', 0
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].invoiceLines[4].taxableItems[0].subType', 'V001'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].invoiceLines[4].taxableItems[0].rate', 0
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].totalDiscountAmount', 0
    EXEC sp_OAMethod @json, 'UpdateNumber', @success OUT, 'documents[0].totalSalesAmount', '555555555555.00'
    EXEC sp_OAMethod @json, 'UpdateNumber', @success OUT, 'documents[0].netAmount', '555555555555.00'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].taxTotals[0].taxType', 'T1'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].taxTotals[0].amount', 0
    EXEC sp_OAMethod @json, 'UpdateNumber', @success OUT, 'documents[0].totalAmount', '555555555555.00'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].extraDiscountAmount', 0
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'documents[0].totalItemsDiscountAmount', 0
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].signatures[0].signatureType', 'I'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'documents[0].signatures[0].value', 'MIIGywYJKoZIhvcNAQcCoIIGvDCCBrgCAQMxDTALBglghkgBZQMEAgEwCwYJKoZIhvcNAQcFoIID/zCCA/swggLjoAMCAQICEEFkOqRVlVar0F0n3FZOLiIwDQYJKoZIhvcNAQELBQAwSTELMAkGA1UEBhMCRUcxFDASBgNVBAoTC0VneXB0IFRydXN0MSQwIgYDVQQDExtFZ3lwdCBUcnVzdCBDb3Jwb3JhdGUgQ0EgRzIwHhcNMjAwMzMxMDAwMDAwWhcNMjEwMzMwMjM1OTU5WjBgMRUwEwYDVQQKFAxFZ3lwdCBUcnVzdCAxGDAWBgNVBGEUD1ZBVEVHLTExMzMxNzcxMzELMAkGA1UEBhMCRUcxIDAeBgNVBAMMF1Rlc3QgU2VhbGluZyB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TELMAkGA1UEBhMCRUcxFDASBgNVBAoTC0VneXB0IFRydXN0MSQwIgYDVQQDExtFZ3lwdCBUcnVzdCBDb3Jwb3JhdGUgQ0EgRzICEEFkOqRVlVar0F0n3FZOLiIwCwYJYIZIAWUDBAIBoIIBCjAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcFMBwGCSqGSIb3DQEJBTEPFw0yMTAyMDEyMzUwMjFaMC8GCSqGSIb3DQEJBDEiBCD5bGXJu9uJZIPMGXK98UrHzJM/V2U/WAO6BErxpX5wdTCBngYLKoZIhvcNAQkQAi8xgY4wgYswgYgwgYUEIAJA8uO/ek3l9i3ZOgRtPhGWwwFYljbeJ7yAgEnyYNCWMGEwTaBLMEkxCzAJBgNVBAYTAkVHMRQwEgYDVQQKEwtFZ3lwdCBUcnVzdDEkMCIGA1UEAxMbRWd5cHQgVHJ1c3QgQ29ycG9yYXRlIENBIEcyAhBBZDqkVZVWq9BdJ9xWTi4iMAsGCSqGSIb3DQEBAQSCAQB13E1WX+zbWppfJi3DBK9MMSB1TXuxcNkGXQ19OcRUUAaAe2K+isobYrUCZbi3ygc2AWOMyafboxjjomzrnvXKrFgspT4wAFPYaAGFzKWq+W/nqMhIqJVIpS/NM7Al4HvuBA5iGuZEQFusElB0yIxOIiYDI4v8Ilkff4/duj/V2CNaN5cqXLOpL5RP6Y5i+VsPGb89t/L0dSIldGN0JqaqarqYo5/RwsUFJJq01DFpPGNbOIX3gSCDmycfhJPS9csnne9Zt+abNpja5ZR6KA8JMe4DHes7FDZqHBNHdC+RDXT4crqmnyiJjizULu6MqDc0Fv3vrMMWDLRlwDecgq7i'

    -- Adds the "Authorization: Bearer <access_token>" header.
    EXEC sp_OASetProperty @http, 'AuthToken', '<access_token>'
    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Content-Type', 'application/json'

    DECLARE @resp int
    EXEC sp_OAMethod @http, 'PostJson3', @resp OUT, 'https://domain.com/api/v1/documentsubmissions', 'application/json', @json
    EXEC sp_OAGetProperty @http, 'LastMethodSuccess', @iTmp0 OUT
    IF @iTmp0 = 0
      BEGIN
        EXEC sp_OAGetProperty @http, 'LastErrorText', @sTmp0 OUT
        PRINT @sTmp0
        EXEC @hr = sp_OADestroy @http
        EXEC @hr = sp_OADestroy @json
        RETURN
      END

    EXEC sp_OAGetProperty @resp, 'StatusCode', @iTmp0 OUT
    PRINT @iTmp0
    EXEC sp_OAGetProperty @resp, 'BodyStr', @sTmp0 OUT
    PRINT @sTmp0
    EXEC @hr = sp_OADestroy @resp


    EXEC @hr = sp_OADestroy @http
    EXEC @hr = sp_OADestroy @json


END
GO

Curl Command

curl -X POST
	-H "Authorization: Bearer <access_token>"
	-H "Content-Type: application/json"
	-d '{
    "documents": [
        {
            "issuer": {
                "address": {
                    "branchID": "0",
                    "country": "EG",
                    "governate": "Cairo",
                    "regionCity": "Nasr City",
                    "street": "580 Clementina Key",
                    "buildingNumber": "Bldg. 0",
                    "postalCode": "68030",
                    "floor": "1",
                    "room": "123",
                    "landmark": "7660 Melody Trail",
                    "additionalInformation": "beside Townhall"
                },
                "type": "B",
                "id": "674859545",
                "name": "Issuer Company"
            },
            "receiver": {
                "address": {
                    "country": "EG",
                    "governate": "Egypt",
                    "regionCity": "Mufazat al Ismlyah",
                    "street": "580 Clementina Key",
                    "buildingNumber": "Bldg. 0",
                    "postalCode": "68030",
                    "floor": "1",
                    "room": "123",
                    "landmark": "7660 Melody Trail",
                    "additionalInformation": "beside Townhall"
                },
                "type": "B",
                "id": "313717919",
                "name": "Receiver"
            },
            "documentType": "I",
            "documentTypeVersion": "0.9",
            "dateTimeIssued": "2021-02-07T02:04:45Z",
            "taxpayerActivityCode": "4620",
            "internalID": "IID1",
            "purchaseOrderReference": "P-233-A6375",
            "purchaseOrderDescription": "purchase Order description",
            "salesOrderReference": "1231",
            "salesOrderDescription": "Sales Order description",
            "proformaInvoiceNumber": "SomeValue",
            "payment": {
                "bankName": "SomeValue",
                "bankAddress": "SomeValue",
                "bankAccountNo": "SomeValue",
                "bankAccountIBAN": "",
                "swiftCode": "",
                "terms": "SomeValue"
            },
            "delivery": {
                "approach": "SomeValue",
                "packaging": "SomeValue",
                "dateValidity": "2020-09-28T09:30:10Z",
                "exportPort": "SomeValue",
                "grossWeight": 10.50,
                "netWeight": 20.50,
                "terms": "SomeValue"
            },
            "invoiceLines": [
                {
                    "description": "Computer1",
                    "itemType": "EGS",
                    "itemCode": "EG-113317713-123456",
                    "unitType": "EA",
                    "quantity": 1,
                    "internalCode": "IC0",
                    "salesTotal": 111111111111.00,
                    "total": 111111111111.00,
                    "valueDifference": 0.00,
                    "totalTaxableFees": 0,
                    "netTotal": 111111111111,
                    "itemsDiscount": 0,
                    "unitValue": {
                        "currencySold": "EGP",
                        "amountEGP": 111111111111.00
                    },
                    "discount": {
                        "rate": 0,
                        "amount": 0
                    },
                    "taxableItems": [
                        {
                            "taxType": "T1",
                            "amount": 0,
                            "subType": "V001",
                            "rate": 0
                        }
                    ]
                },
                {
                    "description": "Computer1",
                    "itemType": "EGS",
                    "itemCode": "EG-113317713-123456",
                    "unitType": "EA",
                    "quantity": 1,
                    "internalCode": "IC0",
                    "salesTotal": 111111111111.00,
                    "total": 111111111111.00,
                    "valueDifference": 0.00,
                    "totalTaxableFees": 0,
                    "netTotal": 111111111111,
                    "itemsDiscount": 0,
                    "unitValue": {
                        "currencySold": "EGP",
                        "amountEGP": 111111111111.00
                    },
                    "discount": {
                        "rate": 0,
                        "amount": 0
                    },
                    "taxableItems": [
                        {
                            "taxType": "T1",
                            "amount": 0,
                            "subType": "V001",
                            "rate": 0
                        }
                    ]
                },
                {
                    "description": "Computer1",
                    "itemType": "EGS",
                    "itemCode": "EG-113317713-123456",
                    "unitType": "EA",
                    "quantity": 1,
                    "internalCode": "IC0",
                    "salesTotal": 111111111111.00,
                    "total": 111111111111.00,
                    "valueDifference": 0.00,
                    "totalTaxableFees": 0,
                    "netTotal": 111111111111,
                    "itemsDiscount": 0,
                    "unitValue": {
                        "currencySold": "EGP",
                        "amountEGP": 111111111111.00
                    },
                    "discount": {
                        "rate": 0,
                        "amount": 0
                    },
                    "taxableItems": [
                        {
                            "taxType": "T1",
                            "amount": 0,
                            "subType": "V001",
                            "rate": 0
                        }
                    ]
                },
                {
                    "description": "Computer1",
                    "itemType": "EGS",
                    "itemCode": "EG-113317713-123456",
                    "unitType": "EA",
                    "quantity": 1,
                    "internalCode": "IC0",
                    "salesTotal": 111111111111.00,
                    "total": 111111111111.00,
                    "valueDifference": 0.00,
                    "totalTaxableFees": 0,
                    "netTotal": 111111111111,
                    "itemsDiscount": 0,
                    "unitValue": {
                        "currencySold": "EGP",
                        "amountEGP": 111111111111.00
                    },
                    "discount": {
                        "rate": 0,
                        "amount": 0
                    },
                    "taxableItems": [
                        {
                            "taxType": "T1",
                            "amount": 0,
                            "subType": "V001",
                            "rate": 0
                        }
                    ]
                },
                {
                    "description": "Computer1",
                    "itemType": "EGS",
                    "itemCode": "EG-113317713-123456",
                    "unitType": "EA",
                    "quantity": 1,
                    "internalCode": "IC0",
                    "salesTotal": 111111111111.00,
                    "total": 111111111111.00,
                    "valueDifference": 0.00,
                    "totalTaxableFees": 0,
                    "netTotal": 111111111111,
                    "itemsDiscount": 0,
                    "unitValue": {
                        "currencySold": "EGP",
                        "amountEGP": 111111111111.00
                    },
                    "discount": {
                        "rate": 0,
                        "amount": 0
                    },
                    "taxableItems": [
                        {
                            "taxType": "T1",
                            "amount": 0,
                            "subType": "V001",
                            "rate": 0
                        }
                    ]
                }
            ],
            "totalDiscountAmount": 0,
            "totalSalesAmount": 555555555555.00,
            "netAmount": 555555555555.00,
            "taxTotals": [
                {
                    "taxType": "T1",
                    "amount": 0
                }
            ],
            "totalAmount": 555555555555.00,
            "extraDiscountAmount": 0,
            "totalItemsDiscountAmount": 0,
            "signatures": [
                {
                    "signatureType": "I",
                    "value": "MIIGywYJKoZIhvcNAQcCoIIGvDCCBrgCAQMxDTALBglghkgBZQMEAgEwCwYJKoZIhvcNAQcFoIID/zCC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ilkff4/duj/V2CNaN5cqXLOpL5RP6Y5i\u002BVsPGb89t/L0dSIldGN0JqaqarqYo5/RwsUFJJq01DFpPGNbOIX3gSCDmycfhJPS9csnne9Zt\u002BabNpja5ZR6KA8JMe4DHes7FDZqHBNHdC\u002BRDXT4crqmnyiJjizULu6MqDc0Fv3vrMMWDLRlwDecgq7i"
                }
            ]
        }
    ]
}'
https://domain.com/api/v1/documentsubmissions

Postman Collection Item JSON

{
  "name": "1.1 Submit Documents (JSON)",
  "request": {
    "auth": {
      "type": "bearer",
      "bearer": [
        {
          "key": "token",
          "value": "{{generatedAccessToken}}",
          "type": "string"
        }
      ]
    },
    "method": "POST",
    "header": [
      {
        "key": "Content-Type",
        "value": "application/json"
      }
    ],
    "body": {
      "mode": "raw",
      "raw": "{\r\n    \"documents\": [\r\n        {\r\n            \"issuer\": {\r\n                \"address\": {\r\n                    \"branchID\": \"0\",\r\n                    \"country\": \"EG\",\r\n                    \"governate\": \"Cairo\",\r\n                    \"regionCity\": \"Nasr City\",\r\n                    \"street\": \"580 Clementina Key\",\r\n                    \"buildingNumber\": \"Bldg. 0\",\r\n                    \"postalCode\": \"68030\",\r\n                    \"floor\": \"1\",\r\n                    \"room\": \"123\",\r\n                    \"landmark\": \"7660 Melody Trail\",\r\n                    \"additionalInformation\": \"beside Townhall\"\r\n                },\r\n                \"type\": \"B\",\r\n                \"id\": \"674859545\",\r\n                \"name\": \"Issuer Company\"\r\n            },\r\n            \"receiver\": {\r\n                \"address\": {\r\n                    \"country\": \"EG\",\r\n                    \"governate\": \"Egypt\",\r\n                    \"regionCity\": \"Mufazat al Ismlyah\",\r\n                    \"street\": \"580 Clementina Key\",\r\n                    \"buildingNumber\": \"Bldg. 0\",\r\n                    \"postalCode\": \"68030\",\r\n                    \"floor\": \"1\",\r\n                    \"room\": \"123\",\r\n                    \"landmark\": \"7660 Melody Trail\",\r\n                    \"additionalInformation\": \"beside Townhall\"\r\n                },\r\n                \"type\": \"B\",\r\n                \"id\": \"313717919\",\r\n                \"name\": \"Receiver\"\r\n            },\r\n            \"documentType\": \"I\",\r\n            \"documentTypeVersion\": \"0.9\",\r\n            \"dateTimeIssued\": \"2021-02-07T02:04:45Z\",\r\n            \"taxpayerActivityCode\": \"4620\",\r\n            \"internalID\": \"IID1\",\r\n            \"purchaseOrderReference\": \"P-233-A6375\",\r\n            \"purchaseOrderDescription\": \"purchase Order description\",\r\n            \"salesOrderReference\": \"1231\",\r\n            \"salesOrderDescription\": \"Sales Order description\",\r\n            \"proformaInvoiceNumber\": \"SomeValue\",\r\n            \"payment\": {\r\n                \"bankName\": \"SomeValue\",\r\n                \"bankAddress\": \"SomeValue\",\r\n                \"bankAccountNo\": \"SomeValue\",\r\n                \"bankAccountIBAN\": \"\",\r\n                \"swiftCode\": \"\",\r\n                \"terms\": \"SomeValue\"\r\n            },\r\n            \"delivery\": {\r\n                \"approach\": \"SomeValue\",\r\n                \"packaging\": \"SomeValue\",\r\n                \"dateValidity\": \"2020-09-28T09:30:10Z\",\r\n                \"exportPort\": \"SomeValue\",\r\n                \"grossWeight\": 10.50,\r\n                \"netWeight\": 20.50,\r\n                \"terms\": \"SomeValue\"\r\n            },\r\n            \"invoiceLines\": [\r\n                {\r\n                    \"description\": \"Computer1\",\r\n                    \"itemType\": \"EGS\",\r\n                    \"itemCode\": \"EG-113317713-123456\",\r\n                    \"unitType\": \"EA\",\r\n                    \"quantity\": 1,\r\n                    \"internalCode\": \"IC0\",\r\n                    \"salesTotal\": 111111111111.00,\r\n                    \"total\": 111111111111.00,\r\n                    \"valueDifference\": 0.00,\r\n                    \"totalTaxableFees\": 0,\r\n                    \"netTotal\": 111111111111,\r\n                    \"itemsDiscount\": 0,\r\n                    \"unitValue\": {\r\n                        \"currencySold\": \"EGP\",\r\n                        \"amountEGP\": 111111111111.00\r\n                    },\r\n                    \"discount\": {\r\n                        \"rate\": 0,\r\n                        \"amount\": 0\r\n                    },\r\n                    \"taxableItems\": [\r\n                        {\r\n                            \"taxType\": \"T1\",\r\n                            \"amount\": 0,\r\n                            \"subType\": \"V001\",\r\n                            \"rate\": 0\r\n                        }\r\n                    ]\r\n                },\r\n                {\r\n                    \"description\": \"Computer1\",\r\n                    \"itemType\": \"EGS\",\r\n                    \"itemCode\": \"EG-113317713-123456\",\r\n                    \"unitType\": \"EA\",\r\n                    \"quantity\": 1,\r\n                    \"internalCode\": \"IC0\",\r\n                    \"salesTotal\": 111111111111.00,\r\n                    \"total\": 111111111111.00,\r\n                    \"valueDifference\": 0.00,\r\n                    \"totalTaxableFees\": 0,\r\n                    \"netTotal\": 111111111111,\r\n                    \"itemsDiscount\": 0,\r\n                    \"unitValue\": {\r\n                        \"currencySold\": \"EGP\",\r\n                        \"amountEGP\": 111111111111.00\r\n                    },\r\n                    \"discount\": {\r\n                        \"rate\": 0,\r\n                        \"amount\": 0\r\n                    },\r\n                    \"taxableItems\": [\r\n                        {\r\n                            \"taxType\": \"T1\",\r\n                            \"amount\": 0,\r\n                            \"subType\": \"V001\",\r\n                            \"rate\": 0\r\n                        }\r\n                    ]\r\n                },\r\n                {\r\n                    \"description\": \"Computer1\",\r\n                    \"itemType\": \"EGS\",\r\n                    \"itemCode\": \"EG-113317713-123456\",\r\n                    \"unitType\": \"EA\",\r\n                    \"quantity\": 1,\r\n                    \"internalCode\": \"IC0\",\r\n                    \"salesTotal\": 111111111111.00,\r\n                    \"total\": 111111111111.00,\r\n                    \"valueDifference\": 0.00,\r\n                    \"totalTaxableFees\": 0,\r\n                    \"netTotal\": 111111111111,\r\n                    \"itemsDiscount\": 0,\r\n                    \"unitValue\": {\r\n                        \"currencySold\": \"EGP\",\r\n                        \"amountEGP\": 111111111111.00\r\n                    },\r\n                    \"discount\": {\r\n                        \"rate\": 0,\r\n                        \"amount\": 0\r\n                    },\r\n                    \"taxableItems\": [\r\n                        {\r\n                            \"taxType\": \"T1\",\r\n                            \"amount\": 0,\r\n                            \"subType\": \"V001\",\r\n                            \"rate\": 0\r\n                        }\r\n                    ]\r\n                },\r\n                {\r\n                    \"description\": \"Computer1\",\r\n                    \"itemType\": \"EGS\",\r\n                    \"itemCode\": \"EG-113317713-123456\",\r\n                    \"unitType\": \"EA\",\r\n                    \"quantity\": 1,\r\n                    \"internalCode\": \"IC0\",\r\n                    \"salesTotal\": 111111111111.00,\r\n                    \"total\": 111111111111.00,\r\n                    \"valueDifference\": 0.00,\r\n                    \"totalTaxableFees\": 0,\r\n                    \"netTotal\": 111111111111,\r\n                    \"itemsDiscount\": 0,\r\n                    \"unitValue\": {\r\n                        \"currencySold\": \"EGP\",\r\n                        \"amountEGP\": 111111111111.00\r\n                    },\r\n                    \"discount\": {\r\n                        \"rate\": 0,\r\n                        \"amount\": 0\r\n                    },\r\n                    \"taxableItems\": [\r\n                        {\r\n                            \"taxType\": \"T1\",\r\n                            \"amount\": 0,\r\n                            \"subType\": \"V001\",\r\n                            \"rate\": 0\r\n                        }\r\n                    ]\r\n                },\r\n                {\r\n                    \"description\": \"Computer1\",\r\n                    \"itemType\": \"EGS\",\r\n                    \"itemCode\": \"EG-113317713-123456\",\r\n                    \"unitType\": \"EA\",\r\n                    \"quantity\": 1,\r\n                    \"internalCode\": \"IC0\",\r\n                    \"salesTotal\": 111111111111.00,\r\n                    \"total\": 111111111111.00,\r\n                    \"valueDifference\": 0.00,\r\n                    \"totalTaxableFees\": 0,\r\n                    \"netTotal\": 111111111111,\r\n                    \"itemsDiscount\": 0,\r\n                    \"unitValue\": {\r\n                        \"currencySold\": \"EGP\",\r\n                        \"amountEGP\": 111111111111.00\r\n                    },\r\n                    \"discount\": {\r\n                        \"rate\": 0,\r\n                        \"amount\": 0\r\n                    },\r\n                    \"taxableItems\": [\r\n                        {\r\n                            \"taxType\": \"T1\",\r\n                            \"amount\": 0,\r\n                            \"subType\": \"V001\",\r\n                            \"rate\": 0\r\n                        }\r\n                    ]\r\n                }\r\n            ],\r\n            \"totalDiscountAmount\": 0,\r\n            \"totalSalesAmount\": 555555555555.00,\r\n            \"netAmount\": 555555555555.00,\r\n            \"taxTotals\": [\r\n                {\r\n                    \"taxType\": \"T1\",\r\n                    \"amount\": 0\r\n                }\r\n            ],\r\n            \"totalAmount\": 555555555555.00,\r\n            \"extraDiscountAmount\": 0,\r\n            \"totalItemsDiscountAmount\": 0,\r\n            \"signatures\": [\r\n                {\r\n                    \"signatureType\": \"I\",\r\n                    \"value\": \"MIIGywYJKoZIhvcNAQcCoIIGvDCCBrgCAQMxDTALBglghkgBZQMEAgEwCwYJKoZIhvcNAQcFoIID/zCCA/swggLjoAMCAQICEEFkOqRVlVar0F0n3FZOLiIwDQYJKoZIhvcNAQELBQAwSTELMAkGA1UEBhMCRUcxFDASBgNVBAoTC0VneXB0IFRydXN0MSQwIgYDVQQDExtFZ3lwdCBUcnVzdCBDb3Jwb3JhdGUgQ0EgRzIwHhcNMjAwMzMxMDAwMDAwWhcNMjEwMzMwMjM1OTU5WjBgMRUwEwYDVQQKFAxFZ3lwdCBUcnVzdCAxGDAWBgNVBGEUD1ZBVEVHLTExMzMxNzcxMzELMAkGA1UEBhMCRUcxIDAeBgNVBAMMF1Rlc3QgU2VhbGluZyBEZW1vIHVzZXIyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApmVGVJtpImeq\\u002BtIJiVWSkIEEOTIcnG1XNYQOYtf5\\u002BDg9eF5H5x1wkgR2G7dvWVXrTsdNv2Q\\u002Bgvml9SdfWxlYxaljg2AuBrsHFjYVEAQFI37EW2K7tbMT7bfxwT1M5tbjxnkTTK12cgwxPr2LBNhHpfXp8SNyWCxpk6eyJb87DveVwCLbAGGXO9mhDj62glVTrCFit7mHC6bZ6MOMAp013B8No9c8xnrKQiOb4Tm2GxBYHFwEcfYUGZNltGZNdVUtu6ty\\u002BNTrSRRC/dILeGHgz6/2pgQPk5OFYRTRHRNVNo\\u002BjG\\u002BnurUYkSWxA4I9CmsVt2FdeBeuvRFs/U1I\\u002BieKg1wIDAQABo4HHMIHEMAkGA1UdEwQCMAAwVAYDVR0fBE0wSzBJ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wdCBUcnVzdDEkMCIGA1UEAxMbRWd5cHQgVHJ1c3QgQ29ycG9yYXRlIENBIEcyAhBBZDqkVZVWq9BdJ9xWTi4iMAsGCSqGSIb3DQEBAQSCAQB13E1WX\\u002BzbWppfJi3DBK9MMSB1TXuxcNkGXQ19OcRUUAaAe2K\\u002BisobYrUCZbi3ygc2AWOMyafboxjjomzrnvXKrFgspT4wAFPYaAGFzKWq\\u002BW/nqMhIqJVIpS/NM7Al4HvuBA5iGuZEQFusElB0yIxOIiYDI4v8Ilkff4/duj/V2CNaN5cqXLOpL5RP6Y5i\\u002BVsPGb89t/L0dSIldGN0JqaqarqYo5/RwsUFJJq01DFpPGNbOIX3gSCDmycfhJPS9csnne9Zt\\u002BabNpja5ZR6KA8JMe4DHes7FDZqHBNHdC\\u002BRDXT4crqmnyiJjizULu6MqDc0Fv3vrMMWDLRlwDecgq7i\"\r\n                }\r\n            ]\r\n        }\r\n    ]\r\n}"
    },
    "url": {
      "raw": "{{apiBaseUrl}}/api/v1/documentsubmissions",
      "host": [
        "{{apiBaseUrl}}"
      ],
      "path": [
        "api",
        "v1",
        "documentsubmissions"
      ]
    }
  },
  "response": [
  ]
}