Back to Aligni.com

GET /api/v2/:api_token/contact
List contacts.

Retrieve the list of all contacts.

Examples

# request
curl -H 'Accept: application/xml' -H 'Content-Type: application/xml' \
https://demo.aligni.com/api/v2/oid3vLgynoy_Yl1gZkrgkLEq3J/contact

# response
<?xml version="1.0" encoding="UTF-8"?>
<contacts>
  <contact>
    <id>4</id>
    <first_name>Jim</first_name>
    <last_name>Milspec</last_name>
    <email>jim@milspec.notreal</email>
    <created_at>2016-06-28T03:59:57-05:00</created_at>
    <updated_at>2016-06-28T03:59:57-05:00</updated_at>
  </contact>
  ...
</contacts>

Params

Param name Description
api_token
required

Your API token.


Value: Must be a String

GET /api/v2/:api_token/contact/:id
Show a contact.

Retrieve one particular contact by its id.

Examples

# request
curl -H 'Accept: application/xml' -H 'Content-Type: application/xml' \
https://demo.aligni.com/api/v2/oid3vLgynoy_Yl1gZkrgkLEq3J/contact/4

# response
<?xml version="1.0" encoding="UTF-8"?>
<contact>
  <id>4</id>
  <first_name>Jim</first_name>
  <last_name>Milspec</last_name>
  <email>jim@milspec.notreal</email>
  <address1>1234 Machining Lane</address1>
  <address2/>
  <address3/>
  <city>Pleasantville</city>
  <state>New Jersey</state>
  <postcode>12345</postcode>
  <country>USA</country>
  <phone1>1-916-555-1212</phone1>
  <phone2></phone2>
  <phone3></phone3>
  <created_on>2006-01-13 20:00:14 -0800</created_on>
  <updated_on>2006-12-13 22:30:29 -0800</updated_on>
  <vendor_id>51</vendor_id>
</contact>

Params

Param name Description
api_token
required

Your API token.


Value: Must be a String
id
required

Value: Must be a number.

POST /api/v2/:api_token/contact
Create a new contact.

Also see show action for detailed XML contact response example.

Create a new contact.

Examples

# request
curl -X POST -H 'Accept: application/xml' -H 'Content-Type: application/xml' -d "
<contact>
  <first_name>Jim</first_name>
  <last_name>Milspec</last_name>
  <email>jim@milspec.notreal</email>
  <job_position>CEO</job_position>
  <vendor_id>51</vendor_id>
</contact>" \
https://demo.aligni.com/api/v2/oid3vLgynoy_Yl1gZkrgkLEq3J/contact

# response (for detailed contact XML see show action)
<contact>
  ...
</contact>

Params

Param name Description
api_token
required

Your API token.


Value: Must be a String

PUT /api/v2/:api_token/contact/:id
Update a contact.

Also see show action for detailed XML contact response example.

Updates a contact record.

Examples

# request
curl -X PUT -H 'Accept: application/xml' -H 'Content-Type: application/xml' -d "
<contact>
  <first_name>Jack</first_name>
  <last_name>Milspec</last_name>
  <email>jim@milspec.notreal</email>
  <job_position>CEO</job_position>
  <vendor_id>51</vendor_id>
</contact>" \
https://demo.aligni.com/api/v2/oid3vLgynoy_Yl1gZkrgkLEq3J/contact/4

# response (for detailed contact XML see show action)
<contact>
  ...
</contact>

Params

Param name Description
api_token
required

Your API token.


Value: Must be a String
id
required

Value: Must be a number.

DELETE /api/v2/:api_token/contact/:id
Delete a contact.

Delete a contact by its id.

Examples

# request
curl -X DELETE -H 'Accept: application/xml' -H 'Content-Type: application/xml' \
https://demo.aligni.com/api/v2/oid3vLgynoy_Yl1gZkrgkLEq3J/contact/4

# no response

Params

Param name Description
api_token
required

Your API token.


Value: Must be a String
id
required

Value: Must be a number.