PostInvoicecXml (POST)

Overview

This POST API allows pushing Invoice posted in ERP into GEP SMART for further processing.

 

URL Format: https://<Instance>/SmartInterfaceAPI/api/Invoice /InvoiceDetails

Request
{
   "basicDetails": {
      "documentName": "string",
      "documentNumber": "string",
      "documentStatus": "string",
      "documentDescription": "string",
      "documentCreator": "string",
      "createdOn": "string",
      "documentBu": [
         {
            "entityCode": "string",
            "isDefault": true,
            "entityType": "string",
            "lobEntityCode": "string"
         }
      ],
      "documentLobDetails": [
         {
            "entityCode": "string",
            "isDefault": true,
            "entityType": "string",
            "lobEntityCode": "string"
         }
      ],
      "operationName": "string"
   },
   "partnerInvoiceNumber": "string",
   "clientPartnerCode": "string",
   "supplierId": "string",
   "businessUnitName": "string",
   "partnerName": "string",
   "partnerInvoiceDate": "2020-04-06T13:42:28.166Z",
   "orderNumber": "string",
   "shiptoLocation": {
      "locationName": "string",
      "locationNumber": "string",
      "address": {
         "addressline1": "string",
         "addressline2": "string",
         "addressline3": "string",
         "city": "string",
         "zipCode": "string",
         "stateInfo": {
            "stateAbbrevationCode": "string",
            "stateName": "string"
         },
         "countryInfo": {
            "countryCode": "string",
            "countryName": "string"
         },
         "phoneNo1": "string",
         "extenstionNo1": "string",
         "phoneNo2": "string",
         "extenstionNo2": "string",
         "mobileNo": "string",
         "faxNo": "string",
         "county": "string",
         "poBoxNumber": "string",
         "isdCode": "string",
         "geoCode": "string",
         "areaCode": "string",
         "createdOn": "2020-04-06T13:42:28.166Z"
      },
      "clientLocationCode": "string"
   },
   "matchStatus": "string",
   "billtoLocation": {
      "locationName": "string",
      "locationNumber": "string",
      "address": {
         "addressline1": "string",
         "addressline2": "string",
         "addressline3": "string",
         "city": "string",
         "zipCode": "string",
         "stateInfo": {
            "stateAbbrevationCode": "string",
            "stateName": "string"
         },
         "countryInfo": {
            "countryCode": "string",
            "countryName": "string"
         },
         "phoneNo1": "string",
         "extenstionNo1": "string",
         "phoneNo2": "string",
         "extenstionNo2": "string",
         "mobileNo": "string",
         "faxNo": "string",
         "county": "string",
         "poBoxNumber": "string",
         "isdCode": "string",
         "geoCode": "string",
         "areaCode": "string",
         "createdOn": "2020-04-06T13:42:28.166Z"
      },
      "clientLocationCode": "string"
   },
   "orderTotal": 0,
   "fileDetail": {
      "fileName": "string",
      "fileUri": "string",
      "attachmentData": "string"
   },
   "headerEntities": [
      {
         "entityCode": "string",
         "isDefault": true,
         "entityType": "string",
         "lobEntityCode": "string"
      }
   ],
   "invoiceOrigin": "string",
   "receivedDate": "2020-04-06T13:42:28.166Z",
   "invoiceTotalAmount": 0,
   "orderContactDetails": {
      "clientContactCode": "string",
      "emailAddress": "string",
      "firstName": "string",
      "lastName": "string"
   },
   "orderingLocation": {
      "locationName": "string",
      "locationNumber": "string",
      "address": {
         "addressline1": "string",
         "addressline2": "string",
         "addressline3": "string",
         "city": "string",
         "zipCode": "string",
         "stateInfo": {
            "stateAbbrevationCode": "string",
            "stateName": "string"
         },
         "countryInfo": {
            "countryCode": "string",
            "countryName": "string"
         },
         "phoneNo1": "string",
         "extenstionNo1": "string",
         "phoneNo2": "string",
         "extenstionNo2": "string",
         "mobileNo": "string",
         "faxNo": "string",
         "county": "string",
         "poBoxNumber": "string",
         "isdCode": "string",
         "geoCode": "string",
         "areaCode": "string",
         "createdOn": "2020-04-06T13:42:28.166Z"
      },
      "clientLocationCode": "string"
   },
   "isPCardSupported": true,
   "invoiceType": "string",
   "purchaseTypeDescription": "string",
   "buyerVatNumber": "string",
   "billable": true,
   "totalAllowance": 0,
   "isMultiDocInvoice": true,
   "scheduledPaymentDate": "2020-04-06T13:42:28.166Z",
   "currency": "string",
   "itemTotalAmount": 0,
   "tax": 0,
   "shipping": 0,
   "additionalCharges": 0,
   "taxesAndCharges": [
      {
         "taxDescription": "string",
         "taxMode": "string",
         "taxValue": 0,
         "taxPercentage": 0,
         "taxCode": "string",
         "isAccrueTax": true,
         "defaultCurrencyCode": "string"
      }
   ],
   "comments": [
      {
         "commentText": "string",
         "accessType": "string",
         "commentAttachment": [
            {
               "fileName": "string",
               "fileUri": "string"
            }
         ]
      }
   ],
   "workOrderNumber": "string",
   "erpOrderType": "string",
   "budgetDescription": "string",
   "paymentTermsDetails": {
      "noOfDays": 0,
      "discount": 0,
      "discountDays": 0,
      "paymentTermCode": "string",
      "paymentTermName": "string",
      "isDefault": true,
      "createdOn": "2020-04-06T13:42:28.166Z"
   },
   "supplierIdentificationValue": "string",
   "customAttributes": [
      {
         "questionnaireTitle": "string",
         "questionnaireResponseValues": [
            {
               "childQuestionSets": [
                  null
               ],
               "columnText": "string",
               "responseValue": "string",
               "rowId": "string"
            }
         ]
      }
   ],
   "sourceSystemName": "string",
   "totalAmount": 0,
   "isMemo": true,
   "remitToLocation": {
      "locationName": "string",
      "locationNumber": "string",
      "address": {
         "addressline1": "string",
         "addressline2": "string",
         "addressline3": "string",
         "city": "string",
         "zipCode": "string",
         "stateInfo": {
            "stateAbbrevationCode": "string",
            "stateName": "string"
         },
         "countryInfo": {
            "countryCode": "string",
            "countryName": "string"
         },
         "phoneNo1": "string",
         "extenstionNo1": "string",
         "phoneNo2": "string",
         "extenstionNo2": "string",
         "mobileNo": "string",
         "faxNo": "string",
         "county": "string",
         "poBoxNumber": "string",
         "isdCode": "string",
         "geoCode": "string",
         "areaCode": "string",
         "createdOn": "2020-04-06T13:42:28.166Z"
      },
      "registrationDetails": [
         {
            "companyIdentificationDisplayName": "string",
            "companyIdentification": "string"
         }
      ]
   },
   "supplierContact": {
      "clientContactCode": "string",
      "emailAddress": "string",
      "firstName": "string",
      "lastName": "string"
   },
   "buyerContact": {
      "clientContactCode": "string",
      "emailAddress": "string",
      "firstName": "string",
      "lastName": "string"
   },
   "isBackInvoice": true,
   "paymentType": "string",
   "invoiceItems": [
      {
         "itemLineNumber": 0,
         "poLineItemNumber": 0,
         "description": "string",
         "unitPrice": 0,
         "quantity": 0,
         "uom": "string",
         "standardUom": "string",
         "totalAllowance": 0,
         "orderNumber": "string",
         "orderingLocation": {
            "id": 0,
            "number": "string",
            "addressInfo": {
               "addressline1": "string",
               "addressline2": "string",
               "addressline3": "string",
               "city": "string",
               "zipCode": "string",
               "stateInfo": {
                  "stateAbbrevationCode": "string",
                  "stateName": "string"
               },
               "countryInfo": {
                  "countryCode": "string",
                  "countryName": "string"
               },
               "phoneNo1": "string",
               "extenstionNo1": "string",
               "phoneNo2": "string",
               "extenstionNo2": "string",
               "mobileNo": "string",
               "faxNo": "string",
               "county": "string",
               "poBoxNumber": "string",
               "isdCode": "string",
               "geoCode": "string",
               "areaCode": "string",
               "createdOn": "2020-04-06T13:42:28.166Z"
            }
         },
         "externalTax": 0,
         "externalTaxes": [
            {
               "taxCode": "string",
               "taxType": "string",
               "taxMode": "string",
               "taxValue": 0,
               "taxRate": 0,
               "authorityName": "string",
               "taxAddress": {
                  "addressline1": "string",
                  "addressline2": "string",
                  "addressline3": "string",
                  "city": "string",
                  "zipCode": "string",
                  "stateInfo": {
                     "stateAbbrevationCode": "string",
                     "stateName": "string"
                  },
                  "countryInfo": {
                     "countryCode": "string",
                     "countryName": "string"
                  },
                  "phoneNo1": "string",
                  "extenstionNo1": "string",
                  "phoneNo2": "string",
                  "extenstionNo2": "string",
                  "mobileNo": "string",
                  "faxNo": "string",
                  "county": "string",
                  "poBoxNumber": "string",
                  "isdCode": "string",
                  "geoCode": "string",
                  "areaCode": "string",
                  "createdOn": "2020-04-06T13:42:28.166Z"
               },
               "locationCode": "string",
               "taxRateCode": "string",
               "effectiveTaxLevel": "string",
               "officialName": "string",
               "taxBase": "string"
            }
         ],
         "manufacturerName": "string",
         "manufacturerPartNumber": "string",
         "itemType": "string",
         "matchStatus": "string",
         "itemExtendedType": "string",
         "documentItemShippingDetails": [
            {
               "shiptoLocation": {
                  "locationName": "string",
                  "locationNumber": "string",
                  "address": {
                     "addressline1": "string",
                     "addressline2": "string",
                     "addressline3": "string",
                     "city": "string",
                     "zipCode": "string",
                     "stateInfo": {
                        "stateAbbrevationCode": "string",
                        "stateName": "string"
                     },
                     "countryInfo": {
                        "countryCode": "string",
                        "countryName": "string"
                     },
                     "phoneNo1": "string",
                     "extenstionNo1": "string",
                     "phoneNo2": "string",
                     "extenstionNo2": "string",
                     "mobileNo": "string",
                     "faxNo": "string",
                     "county": "string",
                     "poBoxNumber": "string",
                     "isdCode": "string",
                     "geoCode": "string",
                     "areaCode": "string",
                     "createdOn": "2020-04-06T13:42:28.166Z"
                  },
                  "registrationDetails": [
                     {
                        "companyIdentificationDisplayName": "string",
                        "companyIdentification": "string"
                     }
                  ]
               },
               "delivertoLocation": {
                  "locationName": "string",
                  "locationNumber": "string",
                  "address": {
                     "addressline1": "string",
                     "addressline2": "string",
                     "addressline3": "string",
                     "city": "string",
                     "zipCode": "string",
                     "stateInfo": {
                        "stateAbbrevationCode": "string",
                        "stateName": "string"
                     },
                     "countryInfo": {
                        "countryCode": "string",
                        "countryName": "string"
                     },
                     "phoneNo1": "string",
                     "extenstionNo1": "string",
                     "phoneNo2": "string",
                     "extenstionNo2": "string",
                     "mobileNo": "string",
                     "faxNo": "string",
                     "county": "string",
                     "poBoxNumber": "string",
                     "isdCode": "string",
                     "geoCode": "string",
                     "areaCode": "string",
                     "createdOn": "2020-04-06T13:42:28.166Z"
                  },
                  "registrationDetails": [
                     {
                        "companyIdentificationDisplayName": "string",
                        "companyIdentification": "string"
                     }
                  ]
               },
               "shippingMethod": "string"
            }
         ],
         "efforts": 0,
         "startDate": "2020-04-06T13:42:28.166Z",
         "endDate": "2020-04-06T13:42:28.166Z",
         "additionalCharges": 0,
         "shippingCharges": 0,
         "tax": 0,
         "itemTotalAmount": 0,
         "billable": "string",
         "buyerItemNumber": "string",
         "supplierPartId": "string",
         "supplierPartAuxiliaryId": "string",
         "taxes": [
            {
               "taxDescription": "string",
               "taxMode": "string",
               "taxValue": 0,
               "taxPercentage": 0,
               "taxCode": "string",
               "isAccrueTax": true,
               "defaultCurrencyCode": "string"
            }
         ],
         "customAttributes": [
            {
               "questionnaireTitle": "string",
               "questionnaireResponseValues": [
                  {
                     "childQuestionSets": [
                        null
                     ],
                     "columnText": "string",
                     "responseValue": "string",
                     "rowId": "string"
                  }
               ]
            }
         ],
         "comments": [
            {
               "commentText": "string",
               "accessType": "string",
               "commentAttachment": [
                  {
                     "fileName": "string",
                     "fileUri": "string"
                  }
               ]
            }
         ],
         "matchType": "string",
         "isTaxExempt": true,
         "fulfilmentDocumentNumber": "string",
         "fulfilmentDocumentType": "string",
         "fulfillmentDocumentLineNumber": "string",
         "clientCategoryId": "string",
         "adjustmentType": 0,
         "itemSplitsDetails": [
            {
               "documentSplitItemEntities": [
                  {
                     "entityType": "string",
                     "entityCode": "string",
                     "entityDisplayName": "string",
                     "createdOn": "2020-01-21T07:59:48.046Z"
                  }
               ],
               "SplitItemTotal": 0,
               "Tax": 0,
               "ShippingCharges": 0,
               "AdditionalCharges": 0,
               "customAttributes": [
                  {
                     "questionnaireTitle": "string",
                     "questionnaireResponseValues": [
                        {
                           "childQuestionSets": [
                              null
                           ],
                           "columnText": "string",
                           "responseValue": "string",
                           "rowId": "string"
                        }
                     ]
                  }
               ]
            }
         ]
      }
   ]
}

 

Response
{
   "data": {},
   "statusCode": "string",
   "errorDetails": [
      {
         "key": "string",
         "errors": [
            {
               "errorCode": "string",
               "errorDescription": "string"
            }
         ]
      }
   ],
   "successDetails": [
      {
         "key": "string"
      }
   ]
}

 

Examples

Success Scenario - Request 
Request below describes that this contains only the mandatory attributes:

 

{
   "BasicDetails": {
      "DocumentCreator": "USKJXK93",
      "CreatedOn": "2020-04-01T18:48:32.653+00:00",
      "DocumentBu": [],
      "DocumentLobDetails": [
         {
            "EntityCode": "KNA-SAP",
            "IsDefault": false
         }
      ],
      "OperationName": "new"
   },
   "PartnerInvoiceNumber": "INV_170420_AK1_Accounting3",
   "ClientPartnerCode": "0080005119",
   "PartnerName": "SOUND RESEARCH",
   "PartnerInvoiceDate": "2020-04-01T18:48:32.807+00:00",
   "OrderNumber": "PO75772655-001",
   "ShiptoLocation": {
      "LocationNumber": "0000023617"
   },
   "BilltoLocation": {
      "LocationName": "GBS Center",
      "LocationNumber": "NUNA",
      "Address": {
         "Addressline1": "PO Box 8881011",
         "City": "Grand Rapids",
         "ZipCode": "49588",
         "StateInfo": {
            "StateAbbrevationCode": "MI"
         },
         "CountryInfo": {
            "CountryCode": "US",
            "CountryName": "United States"
         },
         "CreatedOn": "0001-01-01T00:00:00"
      }
   },
   "OrderTotal": 0,
   "HeaderEntities": [
      {
         "EntityCode": "NUNA",
         "IsDefault": false
      }
   ],
   "InvoiceOrigin": "buyer",
   "ReceivedDate": "2020-04-01T18:48:32.807+00:00",
   "InvoiceTotalAmount": 460,
   "OrderContactDetails": {
      "EmailAddress": "123@gep.com",
      "FirstName": "Kellogg",
      "LastName": "Admin"
   },
   "OrderingLocation": {
      "LocationName": "SOUND RESEARCH",
      "Address": {
         "Addressline1": "250-49 DUNLEVY AVENUE",
         "Addressline2": "",
         "Addressline3": "",
         "City": "VANCOUVER",
         "ZipCode": "V6A 3A3",
         "StateInfo": {
            "StateAbbrevationCode": "BC"
         },
         "CountryInfo": {
            "CountryCode": "CA"
         },
         "CreatedOn": "0001-01-01T00:00:00"
      },
      "ClientLocationCode": "0080000010-0080000010"
   },
   "IsPCardSupported": false,
   "InvoiceType": "Normal",
   "PurchaseTypeDescription": "Standard",
   "Billable": false,
   "TotalAllowance": 0,
   "IsMultiDocInvoice": false,
   "ScheduledPaymentDate": "0001-01-01T00:00:00",
   "Currency": "USD",
   "ItemTotalAmount": 360,
   "Tax": 100,
   "Shipping": 0,
   "AdditionalCharges": 0,
   "TaxesAndCharges": [],
   "Comments": [],
   "WorkOrderNumber": "0",
   "PaymentTermsDetails": {
      "NoOfDays": 0,
      "Discount": 0,
      "DiscountDays": 0,
      "PaymentTermCode": "NT75",
      "IsDefault": false,
      "CreatedOn": "0001-01-01T00:00:00"
   },
   "CustomAttributes": [],
   "SourceSystemName": "KNA-SAP",
   "TotalAmount": 0,
   "IsMemo": false,
   "RemitToLocation": {
      "LocationName": "SOUND RESEARCH",
      "LocationNumber": "0080005119-0050003639",
      "Address": {
         "Addressline1": "250-49 DUNLEVY AVENUE",
         "City": "VANCOUVER",
         "ZipCode": "V6A 3A3",
         "StateInfo": {
            "StateAbbrevationCode": "BC"
         },
         "CountryInfo": {
            "CountryCode": "CA",
            "CountryName": "Canada"
         },
         "PhoneNo1": "(604) 732-1090",
         "PhoneNo2": "",
         "FaxNo": "(604) 732-1096",
         "CreatedOn": "0001-01-01T00:00:00"
      },
      "RegistrationDetails": []
   },
   "SupplierContact": {
      "EmailAddress": "123@gep.com",
      "FirstName": "David",
      "LastName": "Katz"
   },
   "BuyerContact": {
      "EmailAddress": "123@gep.com"
   },
   "IsBackInvoice": false,
   "InvoiceItems": [
      {
         "ItemLineNumber": 1,
         "PoLineItemNumber": 1,
         "Description": "wiufhiu",
         "UnitPrice": 120,
         "Quantity": 1,
         "Uom": "EA",
         "TotalAllowance": 0,
         "OrderingLocation": {
            "Id": 0,
            "Number": ""
         },
         "ExternalTax": 0,
         "ExternalTaxes": [],
         "ItemType": "Material",
         "ItemExtendedType": "Material",
         "DocumentItemShippingDetails": [
            {
               "ShiptoLocation": {
                  "LocationNumber": "0000023617",
                  "Address": {
                     "Addressline1": "1 Trade ST",
                     "City": "Mariemont",
                     "ZipCode": "45227-4509",
                     "StateInfo": {
                        "StateName": "OH"
                     },
                     "CountryInfo": {
                        "CountryCode": "1",
                        "CountryName": "United States"
                     },
                     "CreatedOn": "0001-01-01T00:00:00"
                  },
                  "RegistrationDetails": []
               },
               "DelivertoLocation": {
                  "RegistrationDetails": []
               }
            }
         ],
         "Efforts": 0,
         "StartDate": "0001-01-01T00:00:00",
         "EndDate": "0001-01-01T00:00:00",
         "AdditionalCharges": 0,
         "ShippingCharges": 0,
         "Tax": 50,
         "ItemTotalAmount": 120,
         "SupplierPartId": "",
         "Taxes": [],
         "CustomAttributes": [],
         "Comments": [
            {
               "CommentAttachment": []
            }
         ],
         "IsTaxExempt": false,
         "AdjustmentType": 0,
         "itemSplitsDetails": [
            {
               "documentSplitItemEntities": [
                  {
                     "EntityCode": "1460",
                     "EntityType": "Plant"
                  },
                  {
                     "EntityCode": "700",
                     "EntityType": "Material Group Level 1"
                  },
                  {
                     "EntityCode": "8202440",
                     "EntityType": "Material Group Level 2"
                  },
                  {
                     "EntityCode": "735450025",
                     "EntityType": "Material Group Level 3"
                  }
               ],
               "SplitItemTotal": 240,
               "Tax": 0,
               "ShippingCharges": 0,
               "AdditionalCharges": 0,
               "CustomAttributes": []
            }
         ]
      },
      {
         "ItemLineNumber": 2,
         "PoLineItemNumber": 2,
         "Description": "wiufhiu",
         "UnitPrice": 120,
         "Quantity": 2,
         "Uom": "EA",
         "TotalAllowance": 0,
         "OrderingLocation": {
            "Id": 0,
            "Number": ""
         },
         "ExternalTax": 0,
         "ExternalTaxes": [],
         "ItemType": "Material",
         "ItemExtendedType": "Material",
         "DocumentItemShippingDetails": [
            {
               "ShiptoLocation": {
                  "LocationNumber": "0000023617",
                  "Address": {
                     "Addressline1": "1 Trade ST",
                     "City": "Mariemont",
                     "ZipCode": "45227-4509",
                     "StateInfo": {
                        "StateName": "OH"
                     },
                     "CountryInfo": {
                        "CountryCode": "1",
                        "CountryName": "United States"
                     },
                     "CreatedOn": "0001-01-01T00:00:00"
                  },
                  "RegistrationDetails": []
               },
               "DelivertoLocation": {
                  "RegistrationDetails": []
               }
            }
         ],
         "Efforts": 0,
         "StartDate": "0001-01-01T00:00:00",
         "EndDate": "0001-01-01T00:00:00",
         "AdditionalCharges": 0,
         "ShippingCharges": 0,
         "Tax": 50,
         "ItemTotalAmount": 240,
         "SupplierPartId": "",
         "Taxes": [],
         "CustomAttributes": [],
         "Comments": [
            {
               "CommentAttachment": []
            }
         ],
         "IsTaxExempt": false,
         "AdjustmentType": 0,
         "itemSplitsDetails": [
            {
               "documentSplitItemEntities": [
                  {
                     "EntityCode": "1460",
                     "EntityType": "Plant"
                  },
                  {
                     "EntityCode": "700",
                     "EntityType": "Material Group Level 1"
                  },
                  {
                     "EntityCode": "8202440",
                     "EntityType": "Material Group Level 2"
                  },
                  {
                     "EntityCode": "735450025",
                     "EntityType": "Material Group Level 3"
                  }
               ],
               "SplitItemTotal": 240,
               "Tax": 0,
               "ShippingCharges": 0,
               "AdditionalCharges": 0,
               "CustomAttributes": []
            }
         ]
      }
   ]
}

 

Success Scenario - Response 

 

{
   "data": null,
   "statusCode": "200",
   "errorDetails": [],
   "successDetails": [
      {
         "key": " INV_170420_AK1_Accounting3"
      }
   ]
}

 

Error Scenario - Request 

 

{
   "BasicDetails": {
      "DocumentCreator": "USKJXK93",
      "CreatedOn": "2020-04-01T18:48:32.653+00:00",
      "DocumentBu": [],
      "DocumentLobDetails": [
         {
            "EntityCode": "KNA-SAP",
            "IsDefault": false
         }
      ],
      "OperationName": ""
   },
   "PartnerInvoiceNumber": "INV_170420_AK1_Accounting3",
   "ClientPartnerCode": "0080005119",
   "PartnerName": "SOUND RESEARCH",
   "PartnerInvoiceDate": "2020-04-01T18:48:32.807+00:00",
   "OrderNumber": "PO75772655-001",
   "ShiptoLocation": {
      "LocationNumber": "0000023617"
   },
   "BilltoLocation": {
      "LocationName": "GBS Center",
      "LocationNumber": "NUNA",
      "Address": {
         "Addressline1": "PO Box 8881011",
         "City": "Grand Rapids",
         "ZipCode": "49588",
         "StateInfo": {
            "StateAbbrevationCode": "MI"
         },
         "CountryInfo": {
            "CountryCode": "US",
            "CountryName": "United States"
         },
         "CreatedOn": "0001-01-01T00:00:00"
      }
   },
   "OrderTotal": 0,
   "HeaderEntities": [
      {
         "EntityCode": "NUNA",
         "IsDefault": false
      }
   ],
   "InvoiceOrigin": "buyer",
   "ReceivedDate": "2020-04-01T18:48:32.807+00:00",
   "InvoiceTotalAmount": 460,
   "OrderContactDetails": {
      "EmailAddress": "123@gep.com",
      "FirstName": "Kellogg",
      "LastName": "Admin"
   },
   "OrderingLocation": {
      "LocationName": "SOUND RESEARCH",
      "Address": {
         "Addressline1": "250-49 DUNLEVY AVENUE",
         "Addressline2": "",
         "Addressline3": "",
         "City": "VANCOUVER",
         "ZipCode": "V6A 3A3",
         "StateInfo": {
            "StateAbbrevationCode": "BC"
         },
         "CountryInfo": {
            "CountryCode": "CA"
         },
         "CreatedOn": "0001-01-01T00:00:00"
      },
      "ClientLocationCode": "0080000010-0080000010"
   },
   "IsPCardSupported": false,
   "InvoiceType": "Normal",
   "PurchaseTypeDescription": "Standard",
   "Billable": false,
   "TotalAllowance": 0,
   "IsMultiDocInvoice": false,
   "ScheduledPaymentDate": "0001-01-01T00:00:00",
   "Currency": "USD",
   "ItemTotalAmount": 360,
   "Tax": 100,
   "Shipping": 0,
   "AdditionalCharges": 0,
   "TaxesAndCharges": [],
   "Comments": [],
   "WorkOrderNumber": "0",
   "PaymentTermsDetails": {
      "NoOfDays": 0,
      "Discount": 0,
      "DiscountDays": 0,
      "PaymentTermCode": "NT75",
      "IsDefault": false,
      "CreatedOn": "0001-01-01T00:00:00"
   },
   "CustomAttributes": [],
   "SourceSystemName": "KNA-SAP",
   "TotalAmount": 0,
   "IsMemo": false,
   "RemitToLocation": {
      "LocationName": "SOUND RESEARCH",
      "LocationNumber": "0080005119-0050003639",
      "Address": {
         "Addressline1": "250-49 DUNLEVY AVENUE",
         "City": "VANCOUVER",
         "ZipCode": "V6A 3A3",
         "StateInfo": {
            "StateAbbrevationCode": "BC"
         },
         "CountryInfo": {
            "CountryCode": "CA",
            "CountryName": "Canada"
         },
         "PhoneNo1": "(604) 732-1090",
         "PhoneNo2": "",
         "FaxNo": "(604) 732-1096",
         "CreatedOn": "0001-01-01T00:00:00"
      },
      "RegistrationDetails": []
   },
   "SupplierContact": {
      "EmailAddress": "123@gep.com",
      "FirstName": "David",
      "LastName": "Katz"
   },
   "BuyerContact": {
      "EmailAddress": "123@gep.com"
   },
   "IsBackInvoice": false,
   "InvoiceItems": [
      {
         "ItemLineNumber": 1,
         "PoLineItemNumber": 1,
         "Description": "wiufhiu",
         "UnitPrice": 120,
         "Quantity": 1,
         "Uom": "EA",
         "TotalAllowance": 0,
         "OrderingLocation": {
            "Id": 0,
            "Number": ""
         },
         "ExternalTax": 0,
         "ExternalTaxes": [],
         "ItemType": "Material",
         "ItemExtendedType": "Material",
         "DocumentItemShippingDetails": [
            {
               "ShiptoLocation": {
                  "LocationNumber": "0000023617",
                  "Address": {
                     "Addressline1": "1 Trade ST",
                     "City": "Mariemont",
                     "ZipCode": "45227-4509",
                     "StateInfo": {
                        "StateName": "OH"
                     },
                     "CountryInfo": {
                        "CountryCode": "1",
                        "CountryName": "United States"
                     },
                     "CreatedOn": "0001-01-01T00:00:00"
                  },
                  "RegistrationDetails": []
               },
               "DelivertoLocation": {
                  "RegistrationDetails": []
               }
            }
         ],
         "Efforts": 0,
         "StartDate": "0001-01-01T00:00:00",
         "EndDate": "0001-01-01T00:00:00",
         "AdditionalCharges": 0,
         "ShippingCharges": 0,
         "Tax": 50,
         "ItemTotalAmount": 120,
         "SupplierPartId": "",
         "Taxes": [],
         "CustomAttributes": [],
         "Comments": [
            {
               "CommentAttachment": []
            }
         ],
         "IsTaxExempt": false,
         "AdjustmentType": 0,
         "itemSplitsDetails": [
            {
               "documentSplitItemEntities": [
                  {
                     "EntityCode": "1460",
                     "EntityType": "Plant"
                  },
                  {
                     "EntityCode": "700",
                     "EntityType": "Material Group Level 1"
                  },
                  {
                     "EntityCode": "8202440",
                     "EntityType": "Material Group Level 2"
                  },
                  {
                     "EntityCode": "735450025",
                     "EntityType": "Material Group Level 3"
                  }
               ],
               "SplitItemTotal": 240,
               "Tax": 0,
               "ShippingCharges": 0,
               "AdditionalCharges": 0,
               "CustomAttributes": []
            }
         ]
      },
      {
         "ItemLineNumber": 2,
         "PoLineItemNumber": 2,
         "Description": "wiufhiu",
         "UnitPrice": 120,
         "Quantity": 2,
         "Uom": "EA",
         "TotalAllowance": 0,
         "OrderingLocation": {
            "Id": 0,
            "Number": ""
         },
         "ExternalTax": 0,
         "ExternalTaxes": [],
         "ItemType": "Material",
         "ItemExtendedType": "Material",
         "DocumentItemShippingDetails": [
            {
               "ShiptoLocation": {
                  "LocationNumber": "0000023617",
                  "Address": {
                     "Addressline1": "1 Trade ST",
                     "City": "Mariemont",
                     "ZipCode": "45227-4509",
                     "StateInfo": {
                        "StateName": "OH"
                     },
                     "CountryInfo": {
                        "CountryCode": "1",
                        "CountryName": "United States"
                     },
                     "CreatedOn": "0001-01-01T00:00:00"
                  },
                  "RegistrationDetails": []
               },
               "DelivertoLocation": {
                  "RegistrationDetails": []
               }
            }
         ],
         "Efforts": 0,
         "StartDate": "0001-01-01T00:00:00",
         "EndDate": "0001-01-01T00:00:00",
         "AdditionalCharges": 0,
         "ShippingCharges": 0,
         "Tax": 50,
         "ItemTotalAmount": 240,
         "SupplierPartId": "",
         "Taxes": [],
         "CustomAttributes": [],
         "Comments": [
            {
               "CommentAttachment": []
            }
         ],
         "IsTaxExempt": false,
         "AdjustmentType": 0,
         "itemSplitsDetails": [
            {
               "documentSplitItemEntities": [
                  {
                     "EntityCode": "1460",
                     "EntityType": "Plant"
                  },
                  {
                     "EntityCode": "700",
                     "EntityType": "Material Group Level 1"
                  },
                  {
                     "EntityCode": "8202440",
                     "EntityType": "Material Group Level 2"
                  },
                  {
                     "EntityCode": "735450025",
                     "EntityType": "Material Group Level 3"
                  }
               ],
               "SplitItemTotal": 240,
               "Tax": 0,
               "ShippingCharges": 0,
               "AdditionalCharges": 0,
               "CustomAttributes": []
            }
         ]
      }
   ]
}

 

Error Scenario - Response 

 

{
   "data": null,
   "statusCode": "400",
   "errorDetails": [
      {
         "key": "",
         "errors": [
            {
               "errorCode": "MandatoryException",
               "errorDescription": "There was an error in processing the Invoice as Operation is mandatory."
            }
         ]
      }
   ],
   "successDetails": []
}

 

Data Elements

BasicDetails

Property

Required?

Data type

Description

Validations/Exceptions

DocumentName

No

String

DocumentName

 

DocumentNumber

No

String

DocumentNumber

 

DocumentStatus

No

String

DocumentStatus

 

DocumentDescription

No

String

DocumentDescription

 

DocumentCreator

Yes

String

Client Contact Code

  • Order and Invoice Vendor mismatch

  • Invoice Vendor (Client Partner Code) (Source System Name) does not match with order vendor

CreatedOn

No

String

Date Time of Document

 

DocumentBu

No

List of OrgEntity

DocumentBu

 

DocumentLobDetails

No

List of OrgEntity

Document Lob Details

 

operationName

Yes

String

New / Update

  • Operation is mandatory

Invoice

Property

Required?

Data type

Description

Validations/Exceptions

IsMultiDocInvoice

No

Boolean

IsMultiDocInvoice

 

ScheduledPaymentDate

No

DateTime

ScheduledPaymentDate

 

Currency

Yes

String

Currency

  • Currency is mandatory

  • Currency Code () is invalid

  • Invoice currency code () does not match with order currency code

ItemTotalAmount

yes

Decimal

ItemTotalAmount

  • Charge Amount () cannot be greater than or equal to Invoice Total Amount

Tax

Yes

Decimal

Tax

  • Tax cannot be negative

Shipping

Yes

String

Shipping

  • Shipping charges cannot be negative

AdditionalCharges

Yes

DateTime

AdditionalCharges

  • Additional charges cannot be negative

         

TaxesAndCharges

Yes

List of TaxesandCharge object

TaxesAndCharges

  • Tax Values are not matching at Line Item Number

         

Comments

No

List of InterfaceComment object

Comments

 

WorkOrderNumber

No

String

WorkOrderNumber

 

ErpOrderType

No

String

ErpOrderType

 

BudgetDescription

No

String

BudgetDescription

 

PaymentTermsDetails

No

List of PaymentTermsDetails object

PaymentTermsDetails

 

SupplierIdentificationValue

No

String

SupplierIdentificationValue

 

CustomAttributes

Yes

List of CustomAttribute object

CustomAttributes

 

SourceSystemName

No

String

SourceSystemName

 

TotalAmount

No

Long

TotalAmount

 

TotalAllowance

No

Decimal

TotalAllowance

 

Billable

No

Boolean

Billable

 

PartnerInvoiceNumber

Yes

String

PartnerInvoiceNumber

  • Invoice Number is mandatory

  • Partner Invoice Number is duplicate

  • Partner Invoice Number is mandatory

PartnerName

No

String

PartnerName

  •  

PartnerInvoiceDate

Yes

Datetime

PartnerInvoiceDate

  • Partner Invoice Date is invalid

  • Partner Invoice Date () is invalid

OrderNumber

Yes

String

OrderNumber

  • Invalid Order

ShiptoLocation

No

List of InterfaceShiptoLocation object

ShiptoLocation

  • Ship to Location is not sent

MatchStatus

No

String

MatchStatus

 

BilltoLocation

No

List of InterfaceBilltoLocation object

BilltoLocation

 

InvoiceItems

Yes

List of InterfaceInvoiceItem object

InvoiceItems

 

supplierId

No

String

supplierId

 

OrderTotal

No

Decimal

OrderTotal

 
         

FileDetail

No

List of FileDetail object

FileDetail

 

InvoiceOrigin

Yes

String

InvoiceOrigin

  • Invoice Origin is mandatory

ReceivedDate

No

Datetime

ReceivedDate

  • Invoice received date () is invalid

InvoiceTotalAmount

Yes

Decimal

InvoiceTotalAmount

  • Total calculation is incorrect

  • Invoice Total is not sent

  • Zero Dollar Invoice

OrderContactDetails

No

List of InterfaceBuyerContact object

OrderContactDetails

 

OrderingLocation

No

List of InterfaceLocation object

OrderingLocation

 

IsPCardSupported

No

Boolean

IsPCardSupported

 

InvoiceType

No

String

InvoiceType

 

PurchaseTypeDescription

No

String

PurchaseTypeDescription

 

BuyerVatNumber

No

String

BuyerVatNumber

 

IsMemo

No

Boolean

IsMemo

 

RemitToLocation

Yes

List of InterfaceLocation object

RemitToLocation

  • Invoice Remit to Location is mandatory

SupplierContact

Yes

List of InterfaceBuyerContact object

SupplierContact

 

BuyerContact

 

List of InterfaceBuyerContact object

BuyerContact

 

ClientPartnerCode

yes

String

ClientPartnerCode

  • Supplier (Client Partner Code) does not exists

  • No Vendor sent

  • Vendor is mandatory

  • Vendor () is invalid

IsBackInvoice

No

Boolean

IsBackInvoice

 

IsLineLevelUpdate

No

Boolean

IsLineLevelUpdate

 

PaymentType

No

String

PaymentType

 

TaxesandCharges

Property

Required?

Data type

Description

Validations/Exceptions

TaxDescription

No

String

TaxDescription

 

TaxMode

No

Boolean

TaxMode

  • Invalid tax mode for Item No: ()

TaxValue

No

String

TaxValue

 

TaxPercentage

No

String

TaxPercentage

 

TaxCode

No

String

TaxCode

  • The tax code(s) are not Valid

  • Tax is available at line level

IsAccrueTax

No

String

IsAccrueTax

 

DefaultCurrencyCode

No

String

DefaultCurrencyCode

 

Comments

Property

Required?

Data type

Description

Validations/Exceptions

CommentText

No

String

CommentText

 

CommentAttachment

No

List of InterfaceCommentAttachment object

CommentAttachment

 

CommentAttachment

Property

Required?

Data type

Description

Validations/Exceptions

FileName

No

String

FileName

 

FileUri

No

String

FileUri

 

PaymentTermsDetails

Property

Required?

Data type

Description

Validations/Exceptions

NoOfDays

No

Long

NoOfDays

 

Discount

No

Decimal

Discount

 

DiscountDays

No

Long

DiscountDays

 

PaymentTermCode

No

String

PaymentTermCode

  • Payment Term (Payment Term Code) is invalid

  • Invoice Payment Term does not match with orders Payment Term

PaymentTermName

No

String

PaymentTermName

 

IsDefault

No

Boolean

IsDefault

 

DocumentLobDetails

Property

Required?

Data type

Description

Validations/Exceptions

EntityDetailCode

No

String

EntityDetailCode

 

EntityCode

No

Boolean

EntityCode

 

EntityDisplayName

No

String

EntityDisplayName

 

EntityId

No

String

EntityId

 

ItemSplitsDetails

Property

Required?

Data type

Description

Validations/Exceptions

DocumentSplitItemEntities

No

List of InterfaceDocumentSplit ItemEntity object

DocumentSplitItemEntities

 

SplitItemTotal

Yes

Decimal

SplitItemTotal

Split Total for Item No: () cannot be negative

Tax

No

Decimal

Tax

 

ShippingCharges

yes

Decimal

ShippingCharges

Shipping Charges cannot be negative

AdditionalCharges

Yes

Decimal

AdditionalCharges

Additional Charges cannot be negative

CustomAttributes

No

List of CustomAttribute object

CustomAttributes

 

DocumentSplitItemEntities

Property

Required?

Data type

Description

Validations/Exceptions

EntityType

No

String

EntityType

  • It has duplicate Accounting entity for Item No:

EntityCode

No

String

EntityCode

  • There was an error in processing the Invoice as the item(s) :() has invalid Accounting entity code

EntityDisplayName

No

String

EntityDisplayName

 

CustomAttributes

Property

Required?

Data type

Description

Validations/Exceptions

QuestionnaireTitle

No

String

QuestionnaireTitle

  • Custom Fields Key text is empty at header

QuestionnaireResponseValues

No

List of QuestionnaireResponse Value object

QuestionnaireResponseValues

  • Custom Fields Key-Value's Row Id and Column text is missing at header

QuestionNaireResponseValue

Property

Required?

Data type

Description

Validations/Exceptions

ChildQuestionSets

No

List of CustomAttribute object

ChildQuestionSets

 

ColumnText

No

String

ColumnText

  • Custom Fields Key text is empty at header

  • Custom Fields Key-Value's Column Text is missing at header

ResponseValue

No

String

ResponseValue

 

RowId

No

String

RowId

  • Custom Fields Key-Value's Row Id and Column text is missing at header

  • Custom Fields Key-Value's Row Id is missing at header

  • Custom Fields Key-Value's Row Id is missing/ invalid at header

ChargeDetails

Property

Required?

Data type

Description

Validations/Exceptions

ChargeName

No

String

ChargeName

  • Invalid Items Invalid Charge Name for Charge Amount ()

  • Invalid Items: Invalid Charge Name For below line items

ChargeDescription

No

String

ChargeDescription

 

IsAllowance

No

Boolean

IsAllowance

 

IsIncludeForTax

No

Boolean

IsIncludeForTax

 

IsEditableOnInvoice

No

Boolean

IsEditableOnInvoice

 

ShiptoLocation

Property

Required?

Data type

Description

Validations/Exceptions

ShiptoLocationName

No

String

ShiptoLocationName

  • Invalid Ship to Location

ShiptoLocationNumber

No

String

ShiptoLocationNumber

  • Ship To Location () is invalid

Address

No

List of InterfaceAddress object

Address

 

TelephoneNumber

No

 

TelephoneNumber

 

RegistrationDetails

No

List of PartnerWiseIdentification Detail object

RegistrationDetails

 

Address

Property

Required?

Data type

Description

Validations/Exceptions

IsdCode

No

String

IsdCode

 

PoBoxNumber

No

String

PoBoxNumber

 

County

No

String

County

 

FaxNo

No

String

FaxNo

 

MobileNo

No

String

MobileNo

 

ExtenstionNo2

No

String

ExtenstionNo2

 

PhoneNo2

No

String

PhoneNo2

 

GeoCode

No

String

GeoCode

 

ExtenstionNo1

No

String

ExtenstionNo1

 

CountryInfo

No

List of InterfaceCountryInfo object

CountryInfo

 

StateInfo

No

List of InterfaceStateInfo object

StateInfo

 

ZipCode

No

String

ZipCode

 

City

No

String

City

 

Addressline3

No

String

Addressline3

 

Addressline2

No

String

Addressline2

 

Addressline1

No

String

Addressline1

 

PhoneNo1

No

String

PhoneNo1

 

AreaCode

No

String

AreaCode

 

CountryInfo

Property

Required?

Data type

Description

Validations/Exceptions

CountryCode

No

String

CountryCode

 

CountryName

No

String

CountryName

 

StateInfo

Property

Required?

Data type

Description

Validations/Exceptions

StateAbbrevationCode

No

String

StateAbbrevationCode

 

StateName

No

String

StateName

 

RegistrationDetails

Property

Required?

Data type

Description

Validations/Exceptions

CompanyIdentificationDisplayName

No

String

CompanyIdentificationDisplayName

 

CompanyIdentification

No

String

CompanyIdentification

 

BilltoLocation

Property

Required?

Data type

Description

Validations/Exceptions

BilltoLocationName

No

String

BilltoLocationName

 

BilltoLocationNumber

No

String

BilltoLocationNumber

 

Address

No

List of InterfaceAddress object

Address

 

IsAdhoc

No

Boolean

IsAdhoc

 

RegistrationDetails

No

List of PartnerWiseIdentification Detail object

RegistrationDetails

 

InvoiceItems

Property

Required?

Data type

Description

Validations/Exceptions

ShippingCharges

No

Decimal

ShippingCharges

 

Tax

No

Decimal

Tax

  • Tax for Item No: () cannot be negative

ItemTotalAmount

No

Decimal

ItemTotalAmount

  • Sub total Amount for Item No: () cannot be of zero value

  • Invalid Items Charge Amount cannot be greater than or equal to Invoice Line Item total for below line Number(s): ()

Billable

No

String

Billable

 

ItemLineNumber

No

Long

ItemLineNumber

  • Invoice Line Number for Item No: ( ) is not a unique

  • Invoice Line Number length is greater than 9 digits for Item No: ()

  • Invoice item () is closed for invoicing

  • Length of item line number cannot be greater than 9 digits

SupplierPartId

No

String

SupplierPartId

 

SupplierPartAuxiliaryId

No

String

SupplierPartAuxiliaryId

 

Taxes

No

List of TaxesandCharge object

Taxes

 

CustomAttributes

No

List of CustomAttribute object

CustomAttributes

 

Comments

No

List of InterfaceComment object

Comments

 

MatchType

No

String

MatchType

 

IsTaxExempt

No

Boolean

IsTaxExempt

 

FulfilmentDocumentNumber

No

String

FulfilmentDocumentNumber

 

FulfilmentDocumentType

No

String

FulfilmentDocumentType

 

FulfillmentDocumentLineNumber

No

String

FulfillmentDocumentLineNumber

 

AdditionalCharges

No

Decimal

AdditionalCharges

  • Additional charges cannot be negative for item

ClientCategoryId

No

String

ClientCategoryId

  • Invalid Items () has invalid Client Category Code

EndDate

No

DateTime

EndDate

 

Efforts

No

Decimal

Efforts

 

ItemStatus

No

String

ItemStatus

  • Invalid Status for Item Line Number(s): ()

ItemSplitsDetails

No

List of ItemSplitsDetail object

ItemSplitsDetails

 

PoLineItemNumber

No

Long

PoLineItemNumber

 

TotalAllowance

No

Decimal

TotalAllowance

 

OrderNumber

No

String

OrderNumber

  • Order is not in valid status for invoicing

OrderingLocation

No

OrderingLocation object

OrderingLocation

 

ExternalTax

No

Decimal

ExternalTax

 

ExternalTaxes

No

List of ExternalTax object

ExternalTaxes

 

Description

 

String

Description

 

UnitPrice

Yes

Decimal

UnitPrice

  • Unit Price is mandatory for Item No: ()

  • Unit Price sign cannot be changed for Item

Quantity

Yes

Decimal

Quantity

  • Quantity is mandatory for Item No: ()

  • Quantity cannot be of Zero Value for Item No: ()

  • Quantity sign cannot be changed for Item

Uom

Yes

String

Uom

  • UOM is mandatory for Item No: ()

  • Invoice line number () AS VARCHAR (20)) + ' has invalid UOM code

StandardUom

No

String

StandardUom

 

ManufacturerPartNumber

No

String

ManufacturerPartNumber

 

ItemType

No

String

ItemType

  • ItemType For Item No: () is not a valid Item Type

ItemExtendedType

No

String

ItemExtendedType

  • Item Extended Type for Item No: ()

  • cannot be other than Fixed or Variable

  • Item Extended Type for Item No:()is not valid for Service Line Item

  • Item Extended Type for Item No () is not valid for Material Line Item

DocumentItemShippingDetail

No

List of InterfaceDocumentItemShippingDetail object

DocumentItemShippingDetails

 

StartDate

No

DateTime

StartDate

 

AdjustmentType

No

Int

AdjustmentType

 

ExternalTaxes

Property

Required?

Data type

Description

Validations/Exceptions

TaxCode

No

String

TaxCode

 

TaxType

No

String

TaxType

 

TaxMode

No

String

TaxMode

 

TaxValue

No

Decimal

TaxValue

 

TaxRate

No

Decimal

TaxRate

 

AuthorityName

No

String

AuthorityName

 

TaxAddress

No

InterfaceAddress object

TaxAddress

 

LocationCode

No

String

LocationCode

 

TaxRateCode

No

String

TaxRateCode

 

EffectiveTaxLevel

No

String

EffectiveTaxLevel

 

OfficialName

No

String

OfficialName

 

TaxBase

No

String

TaxBase

 

DocumentItemShippingDetail

Property

Required?

Data type

Description

Validations/Exceptions

ShiptoLocation

No

InterfaceShiptoLocation object

ShiptoLocation

 

DelivertoLocation

No

InterfaceDelivertoLocation object

DelivertoLocation

 

ShippingMethod

No

string

ShippingMethod

 

DelivertoLocation

Property

Required?

Data type

Description

Validations/Exceptions

DelivertoLocationName

No

string

DelivertoLocationName

 

DelivertoLocationNumber

No

string

DelivertoLocationNumber

 

Address

No

InterfaceAddress Object

Address

 

DeliverTo

No

string

DeliverTo

 

RegistrationDetails

No

List of PartnerWiseIdentification Detail object

RegistrationDetails

 

FileDetail

Property

Required?

Data type

Description

Validations/Exceptions

FileName

No

String

FileName

 

FileUri

No

String

FileUri

 

AttachmentData

No

String

AttachmentData

 

OrderContactDetails

Property

Required?

Data type

Description

Validations/Exceptions

Address

No

InterfaceAddress object

Address

 

ClientContactCode

No

String

ClientContactCode

  • The Invoice Header Entity and Contact Code () should be mapped to same LOB

  • Requester () is invalid

EmailAddress

No

String

EmailAddress

 

FirstName

No

String

FirstName

 

LastName

No

String

LastName

 

OrderingLocation

Property

Required?

Data type

Description

Validations/Exceptions

LocationName

No

String

LocationName

 

Address

No

Interface Address Object

Address

 

ClientLocationCode

No

String

ClientLocationCode