ERP REST Vendors

Following interfaces allows to work with vendors.

 

 

Vendor/Create

URL

{url}/ERP/Vendor/Create

Type POST

Description Interface allows to create new vendor. Vendor’s information about integration is not possible to set using the interface and must be set from AP. VendorId and Name must be unique and together with OrderTemplateName and ConsignmentOrderTemplateName sets minimum information which is needed to be provided to create a new vendor.

Schema Type information are marked orange in the schema. Values marked in bold are mandatory information. Values marked in blue must refer to existing entity.

[
 {
 "Name": "string", 100  "VendorId": "string", 100 "OrderTemplateName": "string", 100 "ConsignmentOrderTemplateName": "string", 100 "IntegrationId": "string", 50 "Description": "string", 400 "ShippingNote": "string", 400 "CustomerNumber": "string", 100 "DeliveryCondition": "string", 400  "TermsOfPayment": "string", 400  "PurchasingCurrency": "string", 50  "HasMinimalOrderValue": true,
 "MinimalValuePerOrder": 0,
 "LeadTime": 0,
 "ServiceLeadTime": 0,
 "AllowRestockWithoutOrder": true,
 "AllowOverstockOfNonQuotedItems": true,
 "IsManufacturer": true,
 "IsInternal": true,
 "PrimaryEmailAddress": "string", 100 "WebAddress": "string", 400  "PrimaryPhone": "string", 100  "FaxNumber": "string", 100  "FrameOrderNumber": "string", 100  "IsNotificationEnabled": true,
 "NotificationEmails": [
 "string" 100  ],
 "NotificationNewSuggestedOrder": true,
 "NotificationOrderSent": true,
 "NotificationOrderCancelled": true,
 "NotificationLateOrder": true,
 "NotificationScrappedServiceItem": true,
 "CustomerShipToID": string, 60  "AddressInformations": [
 {
 "CountryCode": "string", 2 "Street": "string", 100 "StreetNumber": "string", 50
 "PostalCode": "string", 50
 "City": "string", 100
 "Comment": "string" 400
 }
 ],
 "ContactPersons": [
 {
 "Surname": "string", 100
 "Name": "string", 100
 "Email": "string", 100
 "Phone": "string", 100
 "Mobile": "string", 100
 "Position": "string" 100
 }
 ]
 }
]

Vendor/GetRequestResult

After API method is successfully called (response code 200), GUID of the request is returned in response. This GUID can be used to check status of the request.

URL

{url}/ERP/Vendor/GetRequestResult

Type GET Parameters

Key Value
requestGuid
GUID returned by calling POST method

Description Method returns result of create/update method based on GUID of previous calling. For the request, following statuses can be shown:

  • ‘Created’ – Request has been received but it has not been added to task queue yet
  • ‘Ready’ – Request has been added to task queue and is currently waiting to be executed
  • ‘Running’ – Changes are currently in progress according the request
  • ‘Completed’ – All changes required by the request has been finished
  • ‘Failed’ – Request has failed to be performed

All changes are described in Result array:

  • ‘Errors’ – Object has not been created/updated/deleted due do validation error
  • ‘Created’ – Objects successfully created
  • ‘Updated’ – Objects successfully updated
  • ‘Deleted’ – Objects successfully been deleted

If any validation errors are found, these errors are listed separately for each object referring to invalid parameter.

Schema

{
 "Message": "string",
 "Status": "Created",
 "Result": {
 "CreatedVendors": [
 "string"
 ],
 "Errors": [
 "string"
 ]
 }
}
Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support