Customers - API Requests

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

Customers

GET

Method:
BaseURL: {{publicApiUrl}}/Customer/{{accountReference}}/{{businessUnitReference}}/Customer_REF
To retrieve details for a specific customer. To retrieve customer details, users would need to pass account and business unit reference to the base URL, along with the customer reference.
Property
Acceptable Format
Validations
Account
String
  • Cannot be Null
  • Cannot be left blank
Business Unit
String
  • Cannot be Null
  • Cannot be left blank
Customer
String
  • Cannot be Null
  • Cannot be left blank

Customer Add

Method:
Base URL: {{publicApiUrl}}/Customer/{{accountReference}}/{{businessUnitReference}}
To add a customer 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 I  containing a sample of the request body.
Property
Acceptable Format
Validations
Account
String
  • Cannot be Null
  • Cannot be left blank
Business Unit
String
  • Cannot be Null
  • Cannot be left blank
Customer can be added without contacts, addresses, cost centre or purchase order information
The key dependencies and validations are:
Property
Acceptable Format
Validations
Refrence
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
BillingScheme
String
  • Can be null
  • Can be blank
BillingGroup
String
  • Can be null
  • Can be blank
InvoiceDeliveryMethod
String
  • Cannot be Null
  • You must provide a Delivery Method.
  • Acceptable values are: - “Email”, “Paper, “Online”
IndustryClassification
String
  • Can be null
  • Can be blank
PayMethod
String
  • Cannot be null
  • Cannot be blank
  • You must provide a valid Payment method.
  • Acceptable values are: “BACS”, “Cheque”, “Manual”, “Cash”, “Chaps”
ApprovalFrequency
WholeNumber
  • Cannot be null
  • Cannot be blank
  • A number must be provided i.e., 60, 120 and that’s in minutes
  • Approval Frequency cannot be negative
Contact
String
  • Can be null
  • If the customer is being added with contact, then the following details needs to be completed
  • You must enter a First Name
  • You must enter a Last Name
  • You must enter an Email Address
  • You must provide a valid Email Address
  • Acceptable values are: “Primary”, “Billing”, “Hiring”, “Other”
ComapniesHouseNumber
WholeNumber
  • Can be null
  • Can be blank
Bank
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.
InternationalBank
String
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
InternationalBankAccount details can only be provided when BACS is set as "NatWest Bankline International"
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 be 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
  • InternationalAddress can be true or false
CostCentre
Boolean
  • Can be null
  • If cost centre record exists then reference and description must be supplied
PurchaseOrder
String
  • Can be null
  • If the purchase order record exists then can be blank or must be provided
Currency
Boolean
  • Cannot be null
  • Cannot be blank
  • Acceptable values are: "EUR", "GBP", "HUF", "USD"

Customer update

Method:
Base URL: {{publicApiUrl}}/Customer/{{accountReference}}/{{businessUnitReference}}
To update a customer 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 J  containing a sample of the request body.
Property
Acceptable Format
Validations
Account
String
  • Cannot be Null
  • Cannot be left blank
Business Unit
String
  • Cannot be Null
  • Cannot be left blank
Note: Customer can be updated without contacts, addresses, cost centre or purchase order information
The key dependencies and validations are:
Property
Acceptable Format
Validations
Reference
String
  • Cannot be null
  • Cannot be blank
  • You must input a customer reference
BackingData
String
  • Can be null
  • Or input the following object in the body and update the values with your available dataset
Backing data records can only be added via customer update
Sample Backing Data -
"backingData": {
"consultantReference": "CS1000002",
"costCentre": "1",
"purchaseOrder": "CU10005A",
"industrySector": "IS0000001",
"jobClassification": "JC0000001",
"jobTitle": "JT0000001",
"HiringManagerContact": "3DD",
"WorkLocationAddress": "3DD",
"BillingAddress": "3DD",
"BillingContact": "3DD",
"externalReference": "EXT-1234",
"customBackingData": [
{
"Reference": "test",
"value": "666"
}
],
"hasConsultantSplits": false
}


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.