Suppliers - API Requests

This document provides information about the PurePro public API endpoints associated with supplier operations and their objects.
Common operations;
Please select one of the options below: -

Suppliers

GET

Method:
{{publicApiUrl}}/Supplier/{{accountReference}}/Supplier_REF
To retrieve details for a specific supplier. To retrieve supplier details, users would need to pass account and business unit reference to the base URL, along with the supplier reference.
Account
  • Cannot be Null
  • Cannot be left blank
Business Unit
  • Cannot be Null
  • Cannot be left blank
Supplier
  • Cannot be Null
  • Cannot be left blank

Supplier Add

Method:
Base URL: {{publicApiUrl}}/Supplier/{{accountReference}}
To add an Agency or Umbrella Supplier record using the public API you need to pass the account and business unit reference to the BASE URL with the required objects in the body. Refer to  Appendix E  containing a sample of the request body.
Note: A supplier record can be created with or without contact and address objects
Account
  • Cannot be Null
  • You must select an existing Account to add a worker
Business Unit
  • Cannot be Null
  • You must select an existing Business Unit to add a worker
The key dependencies and validations are:
"Reference":"string"
  • Cannot be null
  • Can be blank and the system will automatically generate a reference from the worker
"Name":"string"
  • Cannot be null
  • You must enter a Supplier Name
"Email":"string"
  • Cannot be null
  • Cannot be blank
  • You must enter a Supplier Email Address
  • You must provide a valid Supplier Email Address
"invoiceWorkflow":"string"
  • Cannot be null
  • Acceptable values for invoiceworkflow are: “None”, “InvoiceMatching”, “SelfBilling”

  • If invoiceworkflow = “selfbilling” and no selfbillexpirydate is provided then validation will appear
  • Please enter a self bill expiry date!
  • Acceptable format: “2023-01-28T00:00:00”

  • If invoiceworkflow = none and settlementterm = “default” then validation will appear
  • Settlement term should be 0 days if invoice workflow is set to none

  • If invoiceworkflow = “invoicematching” or “selfbilling” and settlement is not provided then validation will appear
  • Please select a Settlement Term
"WorkerEngagement":"string"
  • Cannot be null
  • Cannot be blank
  • Acceptable values for workerEngagement can be: “A”, “B”, “C”, “D”, “E”, “F”
  • If workerengament = “D” and no companyhousenumber is provided then it will always return as “F” because it has defaulted by the system.
"SuppliedEngagementType":"string"
  • Cannot be null
  • Cannot be blank
  • Please select a Supplied Worker Engagement Type
  • Acceptable values: “Agency”, “Umbrella”
"PaymentMethod":"string"
  • Cannot be null
  • Cannot be blank
  • You must provide a valid Payment method.
  • Acceptable values are: “BACS”, “Cheque”, “Manual”, “Cash”, “Chaps”
"UniqueTaxPayerReference":"wholenumber"
  • Can be null
  • Can be blank
  • Unique Tax Payer Reference is required
  • Unique Tax Payer Reference must be numeric only
  • Unique Tax Payer Reference must be 10 digits long
"SettlementTerms":"string"
  • Cannot be null
  • Cannot be blank
  • The acceptable values are: "Default", "Payment Term 1", "Payment Term 2", "Payment Term 3", "Payment Term 4", "Payment Term 5", "Payment Term 6", "Payment Term 7", "Payment Term 8", "Payment Term 9", "Payment Term 10"
"CompaniesHouseNumber":"wholenumber"
  • Can be null
  • Can be blank
"Currency":"string"
  • Cannot be null
  • Cannot be blank
  • Please select a Base Currency
  • Acceptable values are: "EUR", "GBP", "HUF", "USD"
"VATNumber":"wholenumber"
  • Can be null
  • Can be blank
"VATNumberValid":"boolean"
  • Can be false or true
  • Cannot be null
  • Cannot be blank
"Address":"string"
  • Can be null.
  • If the address record doesn’t exist in the body, then will return 200 but record will display as failed validation error in the webapp.
  • You must enter the Address Line 1
  • Address Line 1 must be between 1 and 35 characters.
  • You must enter a postcode.
  • Postcode - incorrect format
  • Worker has missing address detail. Please ensure at least 2 lines of the address are populated.
  • InternationalAddress can true or false
If InternationalAddress = true
  • Mandatory values:
  • address1
  • address2
  • Country
Note: If Country = GB and InternationalAddress = true, then the supplied worker linked to the supplier record will be marked as validation error “Cannot set International Address when Country is UK for the supplier xx”.
Country can be provided using either the country code e.g. UK or the name e.g. United Kingdom
If InternationalAddress = false
  • Mandatory values:
  • address1 and
  • address2 or
  • address3 or
  • Town or
  • County
  • Postcode
"BankAccount":"string"
  • Can be null
  • If the bank details record doesn’t exist in the body, then will return 200 but record will display as failed validation error
  • Valid Account Name is required
  • Account Number must be 8 digits long
  • Sort Code must be 6 digits long
  • If the key paymentMethod = “cheque” then the bank details are not required can be left blank otherwise you will receive the following validation: You must provide a valid Payment method.
When InternationalBankAccount = true
  • Mandatory values
  • AccountName
  • IBAN
  • BIC
  • Optional values:
  • BankReference
  • BankName
All other fields are ignored regardless of entry.
When InternationalBankAccount = false
  • Mandatory values:
  • AccountName
  • SortCode
  • AccountNumber
  • Optional values:
  • BankReference
  • BankName
All other fields are ignored regardless of entry.
"Contact":"string"
  • Can be null
  • Cannot be blank
  • The Last Name field is required.
  • The First Name field is required.
  • The Email Address field is required.


Supplier Update

Method:
Base URL: {{publicApiUrl}}/Supplier/{{accountReference}}
To update a Supplier using the public API you need to pass the account reference to the Base URL with the required objects in the body. Refer to  Appendix F  containing a sample of the request body.
Note: You can update the supplier record with or without the contact or addresses objects in the body
Account
  • Cannot be Null
  • You must select an existing Account to add a worker
The key dependencies and validations are:
"Reference":"string"
  • Cannot be null
  • Reference must be provided to update the worker
"WorkerEngagement":"string"
  • Cannot be null
  • Cannot be blank
  • Acceptable values for workerEngagement can be: “A”, “B”, “C”, “D”, “E”, “F”
  • If workerengament = “D” and no companyhousenumber is provided, then it will always return as “F” because it has defaulted by the system.
"Address":"string"
  • Can be null
  • If the address record doesn’t exist in the body, then will return 200 but record will display as failed validation error in the webapp
  • You must enter the Address Line 1
  • Address Line 1 must be between 1 and 35 characters
  • You must enter a postcode
  • Postcode - incorrect format
  • Worker has missing address detail. Please ensure at least 2 lines of the address are populated.
  • InternationalAddress can true or false
If InternationalAddress = true
  • Mandatory values:
  • address1
  • address2 or address3
  • Country
Note: If Country = GB and InternationalAddress = true, then the supplied worker linked to the supplier record will be marked as validation error “Cannot set International Address when Country is UK for the supplier xx”.
Country can be provided using either the country code e.g. UK or the name e.g. United Kingdom
If InternationalAddress = false
  • Mandatory values:
  • address1
  • address2 or address3
  • postcode
"BankAccount":"string"
  • Can be null
  • If the bank details record doesn’t exist in the body, then will return 200 but record will display as failed validation error
  • Valid Account Name is required
  • Account Number must be 8 digits long
  • Sort Code must be 6 digits long
  • If the key paymentMethod = “cheque” then bank details are not required can be left blank otherwise you will receive the following validation: You must provide a valid Payment method.
When InternationalBankAccount = true
  • Mandatory values
  • AccountName
  • IBAN
  • BIC
  • Optional values:
  • BankReference
  • BankName
All other fields are ignored regardless of entry.
When InternationalBankAccount = false
  • Mandatory values:
  • AccountName
  • SortCode
  • AccountNumber
  • Optional values:
  • BankReference
  • BankName
All other fields are ignored regardless of entry.
"Contact":"string"
  • Can be null
  • Cannot be blank
  • The Last Name field is required.
  • The First Name field is required.
  • The Email Address field is required.


The contents of this document, along with any associated documents, are the property of PurePro Solutions Ltd. and are shared in strict confidence with the intended recipient. These materials may not be reproduced, shared, or used in any manner without prior written consent from PurePro Solutions Ltd. Unauthorized use or distribution is prohibited.