Affiliate Contacts

Fields summary

Field

Type

Read

Write

Filter

Order

Default

Req. for new

id

primary

status

enum

Active

vendor_id

vendors.id

first_name

string

last_name

string

email

email

phone

string

skype

string

type

string

Available options

Field: status

Current state of Affiliate Contact.

Option

Description

Active

Affiliate Contact is ready to work.

Deleted

Affiliate Contact was deleted and is not visible in web UI.

get
Get list by parent

https://api.CLIENT_ID.item8.io/v1/vendor-contacts/:vendor_id/list
Find list of Vendor contact by parent ID.
Request
Response
Path Parameters
vendor_id
required
int
Unique primary identifier of item8 parent object.
Headers
Item8-Api-Key
required
string
Authentication API key.
200: OK
{
"status": "success",
"message": "",
"data": [
{
"id": 42,
"status": "Active",
"vendor_id": 42,
"first_name": "John",
"last_name": "Smith",
"email": "john.smith@example.com",
"phone": "(888) 555-7238",
"skype": "john.smith",
"type": "Finance Manager"
}
]
}
403: Forbidden
If you don't have an access.
{
"status": "forbidden",
"message": "You don't have an access to list action.",
"data": []
}

get
Get by ID

https://api.CLIENT_ID.item8.io/v1/vendor-contacts/:id
Find any vendor-contact by id.
Request
Response
Path Parameters
id
required
int
Unique primary identifier of item8 object.
Headers
Item8-Api-Key
required
string
Authentication API key.
200: OK
{
"status": "success",
"message": "",
"data": {
"id": 42,
"status": "Active",
"vendor_id": 42,
"first_name": "John",
"last_name": "Smith",
"email": "john.smith@example.com",
"phone": "(888) 555-7238",
"skype": "john.smith",
"type": "Finance Manager"
}
}
403: Forbidden
If you don't have an access.
{
"status": "forbidden",
"message": "You don't have an access to Vendor contact.",
"data": []
}
404: Not Found
If vendor-contact doesn't exist.
{
"status": "error",
"message": "Vendor contact with id=42 not found.",
"data": []
}

post
Create

https://api.CLIENT_ID.item8.io/v1/vendor-contacts
Request to create new vendor-contact in item8.
Request
Response
Headers
Item8-Api-Key
required
string
Authentication API key.
Form Data Parameters
status
optional
string
Current state of Affiliate Contact. Use only available options, see above.
vendor_id
required
string
Parent object for the contact.
first_name
required
string
Contact person first name.
last_name
optional
string
Contact person last name.
email
required
string
Affiliate Contact email for contact and notification if type is Finance Manager
phone
optional
string
Contact phone.
skype
optional
string
Contact skype id.
type
required
string
Custom type of contact.
200: OK
Vendor contact has been created and you get the data as it is stored in item8.
{
"status": "success",
"message": "New vendor-contact created.",
"data": {
"id": 42,
"status": "Active",
"vendor_id": 42,
"first_name": "John",
"last_name": "Smith",
"email": "john.smith@example.com",
"phone": "(888) 555-7238",
"skype": "john.smith",
"type": "Finance Manager"
}
}
403: Forbidden
If you don't have an access.
{
"status": "forbidden",
"message": "You don't have an access to create action.",
"data": []
}

put
Update

https://api.CLIENT_ID.item8.io/v1/vendor-contacts/:id
Request to update existing vendor-contact in item8.
Request
Response
Path Parameters
id
required
int
Unique primary identifier of item8 object.
Headers
Item8-Api-Key
required
string
Authentication API key.
Form Data Parameters
status
optional
string
Current state of Affiliate Contact. Use only available options, see above.
vendor_id
optional
string
Parent object for the contact.
first_name
optional
string
Contact person first name.
last_name
optional
string
Contact person last name.
email
optional
string
Affiliate Contact email for contact and notification if type is Finance Manager
phone
optional
string
Contact phone.
skype
optional
string
Contact skype id.
type
optional
string
Custom type of contact.
200: OK
Vendor contact has been updated and you get data as it is stored in item8.
{
"status": "success",
"message": "Vendor contact updated successfully.",
"data": {
"id": 42,
"status": "Active",
"vendor_id": 42,
"first_name": "John",
"last_name": "Smith",
"email": "john.smith@example.com",
"phone": "(888) 555-7238",
"skype": "john.smith",
"type": "Finance Manager"
}
}
403: Forbidden
If you don't have an access.
{
"status": "forbidden",
"message": "You don't have an access to update action.",
"data": []
}
500: Internal Server Error
Validator finds some problem in your request.
{
"status": "error",
"message": "Email is not valid.",
"data": []
}

delete
Delete

https://api.CLIENT_ID.item8.io/v1/vendor-contacts/:id
Delete existing vendor-contact from item8.
Request
Response
Path Parameters
id
required
int
Unique primary identifier of item8 object.
Headers
Item8-Api-Key
required
string
Authentication API key.
Form Data Parameters
reason
optional
string
Reason why you delete vendor-contact Item8 saves the message in history. It should be empty or minimum 6 chars.
200: OK
Vendor contact has been deleted.
{
"status": "success",
"message": "Vendor contact deleted successfully.",
"data": []
}
403: Forbidden
If you don't have an access.
{
"status": "forbidden",
"message": "You don't have an access to delete action.",
"data": []
}
500: Internal Server Error
if validator finds some problem in your request.
{
"status": "error",
"message": "Message of reason should be minimum 6 letters.",
"data": []
}