Contacts

Contacts are persons working at the supplier that can be contacted for enquiries.

Create Contact

curl -i -X POST "https://example.ziik.io/api/suppliers/123/contacts"
  -H "Authorization: Bearer aaaaaaaaa.bbbbbbbbb.cccccccccc"
  -d "{ [...] }"

The above command returns 201 Created with a location header for where to find the newly created contact

HTTP/1.0 201 Created
Location: https://example.ziik.io/api/suppliers/contacts/1234
{
  "data": {
    "id": 2,
    "name": "Walter Ensign",
    "title": "New Accounts Clerk",
    "email": "ewalter@yahoo.com",
    "phone": "741-570-6115 x0637",
    "mobile": "1-480-572-9152",
    "skype": "walter.ensign"
  }
}

This endpoint creates a new supplier contact.

HTTP Request

POST https://example.ziik.io/api/suppliers/ID/contacts

URL Parameters

ParameterTypeDescription
IDIntegerID of the supplier

Request Parameters

ParameterTypeRequiredDescription
nameStringYesContact name
titleStringNoContact work title
emailStringNoContact email
mobileStringNoContact mobile phone number
phoneStringNoContact phone number
skypeStringNoContact Skype name

Permissions Required

  • Edit permission to supplier

Get Contacts For Supplier

curl "https://example.ziik.io/api/suppliers/123/contacts"
  -H "Authorization: Bearer aaaaaaaaa.bbbbbbbbb.cccccccccc"
{
  "data": [
    {
      "id": 1,
      "name": "John Miller",
      "title": "Cultural Studies Teacher",
      "email": "eabbott@hotmail.com",
      "phone": "784.852.1280 x20364",
      "mobile": "+1-541-547-7087",
      "skype": "john.miller"
    }
  ]
}

This endpoint retrieves a list of contacts for a supplier.

HTTP Request

GET https://example.ziik.io/api/suppliers/ID/contacts

URL Parameters

ParameterTypeDescription
IDIntegerThe ID of the supplier

Permissions Required

  • Access to supplier

Get Single Contact

curl "https://example.ziik.io/api/suppliers/123/contacts/12"
  -H "Authorization: Bearer aaaaaaaaa.bbbbbbbbb.cccccccccc"
{
  "data": {
    "id": 1,
    "name": "Jeffrey Pfeffer",
    "title": "Gas Plant Operator",
    "email": "murazik.maya@hotmail.com",
    "phone": "594.776.5640 x59977",
    "mobile": "+16264716750",
    "skype": "Jeffrey.Pfeffer"
  }
}

This endpoint retrieves a single contact from a supplier.

HTTP Request

GET https://example.ziik.io/api/suppliers/SUPPLIERID/contacts/CONTACTID

URL Parameters

ParameterTypeDescription
SUPPLIERIDIntegerThe ID of the supplier
CONTACTIDIntegerThe ID of the contact - must be connected to the supplier

Permissions Required

  • Access to supplier

Edit Contact

curl -i -X PATCH "https://example.ziik.io/api/suppliers/123/contacts/12"
  -H "Authorization: Bearer aaaaaaaaa.bbbbbbbbb.cccccccccc"
  -d "{ [...] }"

The above command returns 204 No Content on successful update.

HTTP/1.0 204 No Content

This endpoint updates an existing supplier contact.

HTTP Request

PATCH https://example.ziik.io/api/suppliers/SUPPLIERID/contacts/CONTACTID

URL Parameters

ParameterTypeDescription
SUPPLIERIDIntegerThe ID of the supplier
CONTACTIDIntegerThe ID of the contact - must be connected to the supplier

Request Parameters

ParameterTypeRequiredDescription
nameStringNoContact name
titleStringNoContact work title
emailStringNoContact email
mobileStringNoContact mobile phone number
phoneStringNoContact phone number
skypeStringNoContact Skype name

Permissions Required

  • Edit permission to supplier

Delete Contact

curl -i -X DELETE "https://example.ziik.io/api/suppliers/123/contacts/12"
  -H "Authorization: Bearer aaaaaa.bbbbbbb.ccccccc"

The above command returns a 204 No Content header on success:

HTTP/1.0 204 No Content

This endpoint deletes a contact from a supplier.

HTTP Request

DELETE https://example.ziik.io/api/suppliers/SUPPLIERID/contacts/CONTACTID

URL Parameters

ParameterTypeDescription
SUPPLIERIDIntegerThe ID of the supplier
CONTACTIDIntegerThe ID of the contact - must be connected to the supplier

Permissions Required

  • Edit permission to supplier
Contributors: Christian Gerdes