Endpoints꞉ Contacts - Fastway-Couriers-South-Africa/myFastway.ApiClient GitHub Wiki
Endpoints
Endpoint | Verb | Paging | Description |
---|---|---|---|
/api/contacts | GET | Y | returns all contacts |
/api/contacts/{Id} | GET | returns contact for a given Id | |
/api/contacts | POST | create new Contact | |
/api/contacts | PUT | updates existing Contact | |
/api/contacts/{contactId} | DELETE | deletes a contact for a given Id |
Post
For a contact to be successfully saved, the address will have to be considered valid (see address validation)
Objects
Contact Request
{
"code": "",
"businessName": "",
"displayName": "",
"contactName": "",
"phoneNumber": "",
"email": "",
"instructions": "",
"address": {
"streetAddress": "",
"additionalDetails": "",
"locality": "",
"stateOrProvince": "",
"postalCode": "",
"country": "",
"placeId": "",
"lat": 0,
"lng": 0
},
"version": ""
}
Instructions - The default Special Instructions that will automatically be populated on a consignment for this contact
version - (read only) This stamp is used to determine whether the object has been updated by another user. This field is require for updates (PUT)
Contact Response
{
"contactId": 0,
"code": "",
"businessName": "",
"displayName": "",
"contactName": "",
"phoneNumber": "",
"email": "",
"instructions": "",
"address": {
"addressId": 0,
"streetAddress": "",
"additionalDetails": "",
"locality": "",
"stateOrProvince": "",
"postalCode": "",
"country": "",
"placeId": "",
"lat": 0,
"lng": 0,
"userCreated": false,
"hash": "",
"updatedOn": "",
"updatedBy": ""
},
"hash": "",
"version": "",
"updatedOn": "",
"updatedBy": ""
}
hash (read only) This is hash of the contact and address object
address.userCreated (read only) This indicates the lat, lng have be user provided
address.hash (read only) This is hash of the address object