Back to Aligni.com

GET /api/v2/:api_token/vendor
List vendors.

Retrieve the list of all vendors. Note that each record is abbreviated. You will need to retrieve a specific record for full details.

Examples

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

# response
<?xml version="1.0" encoding="UTF-8"?>
<vendors>
  <vendor>
    <id>40</id>
    <name>Digi-Key</name>
    <short_name>DGK</short_name>
    <created_at>2016-06-28T03:59:57-05:00</created_at>
    <updated_at>2016-06-28T03:59:57-05:00</updated_at>
  </vendor>
  ...
</vendors>

Params

Param name Description
api_token
required

Your API token.


Value: Must be a String

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

Retrieve one particular vendor by its id.

Examples

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

# response
<?xml version="1.0" encoding="UTF-8"?>
<vendor>
  <id>40</id>
  <name>Digi-Key</name>
  <short_name>DGK</short_name>
  <website/>
  <account_number/>
  <address1>701 Brooks Avenue South</address1>
  <address2/>
  <address3/>
  <city>Thief River Falls</city>
  <state>MN</state>
  <postcode>56701</postcode>
  <country>USA</country>
  <phone1>800.344.4539</phone1>
  <phone2></phone2>
  <phone3></phone3>
  <manufacturers>
    <manufacturer>
      <id>175</id>
    </manufacturer>
    ...
  </manufacturers>
</vendor>

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/vendor
Create a new vendor.

Also see show action for detailed XML vendor response example.

Create a new vendor.

Examples

# request
curl -X POST -H 'Accept: application/xml' -H 'Content-Type: application/xml' -d "
<vendor>
  <name>Aligni</name>
</vendor>" \
https://demo.aligni.com/api/v2/oid3vLgynoy_Yl1gZkrgkLEq3J/vendor

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

Params

Param name Description
api_token
required

Your API token.


Value: Must be a String

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

Also see show action for detailed XML vendor response example.

Updates a vendor record.

Examples

# request
curl -X PUT -H 'Accept: application/xml' -H 'Content-Type: application/xml' -d "
<vendor>
  <name>Aligni Inc.</name>
</vendor>" \
https://demo.aligni.com/api/v2/oid3vLgynoy_Yl1gZkrgkLEq3J/vendor/69

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

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/vendor/:id
Delete a vendor.

Delete a vendor 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/vendor/69

# no response

Params

Param name Description
api_token
required

Your API token.


Value: Must be a String
id
required

Value: Must be a number.