Manuais
PHC GO Create Customers
 

Method


The method to be called is:



Parameters


In the request headers the Authorization header must have the Access Token:

  • Authorization: {{accessToken}}


JSON body


In the body of the POST a JSON structure like this one has to be passed:

{
"customer": {
"number": 86298,
"name": "JUERGEN SCHOBER",
"address": "",
"postalCode": "",
"city": "",
"country": "DE",
"email": "",
"taxNumber": "233936688",
"phone": "884112332",
"mobilePhone": "332445221",
"iban": "1122333444455",
"bic": "3331444112",
"observations": "This is an example"
}
}

Return Information


Any call made to this method will return a JSON information with this structure:

  1. In case of success:


    {
    "code": 1,
    "message": "Information saved with success"
    }


  2. In case of error:


    {
    "code": 100,
    "message": "Error message"
    }



JSON Specification for Create Customers



Customer


 
NameTypePHC GO EntityPHC GO FieldObservations
numberIntegerClno
name1StringClnome
createEstablishmentBooleanCl- If createEstablishment parameter is activated (true), the number parameter becomes mandatory.
addressStringClmorada
address2StringClmorada2
postalCodeStringClcodpost
cityStringCllocal
country1StringClpaisCan be set with the full name or the alpha-2 letter ISO3166 format.
Ex. “PT”, “ES”,”US” (See here)
Note: Only exception is for GB which must send UK.
emailStringClemail
taxNumberStringClncontRequired when PHC Go Application parameter “Tax number required” is True.
phoneStringCltelefone
mobilePhoneStringCltlmvl
ibanStringCliban
bicStringClswift
observationsStringClobs
abbreviatedNameStringClnome2
refintStringClrefIntInternal reference.
province (required field for Spain and Angola)StringClprovinciaCustomer Province.
county (required field for Angola)StringClmunicipioCustomer county.

 


Footnotes


1 - Required
 
 

Example