vendors
Create vendor
Changed onAdds a vendor to a company
post/api/v1/vendors
Request
- Base URLhttps://demo.invoiceninja.com
- Authnone declared. Required headers: X-API-TOKEN, X-Requested-With
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
includestring
Example:first_load
Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes
Headers
X-API-TOKENstring required
Example:TOKEN
The API token to be used for authentication
X-Requested-Withstring required
Example:XMLHttpRequest
Used to send the XMLHttpRequest header
Request body
Example request
{
"name": "ABC Supply Company",
"address1": "123 Main Street",
"address2": "Suite 100",
"city": "New York",
"state": "NY",
"postal_code": "10001",
"country_id": "1",
"phone": "+1-555-123-4567",
"email": "contact@abcsupply.com",
"website": "https://www.abcsupply.com",
"custom_value1": "Custom value 1",
"custom_value2": "Custom value 2",
"custom_value3": "Custom value 3",
"custom_value4": "Custom value 4",
"archived_at": 1640995200,
"contacts": [
{
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@abcsupply.com",
"phone": "+1-555-123-4567",
"send_email": true
}
]
}Response
Returns the saved vendor object
Example response
{
"id": "Opnel5aKBz",
"user_id": "Opnel5aKBz",
"assigned_user_id": "Opnel5aKBz",
"contacts": [
{
"id": "Opnel5aKBz",
"user_id": "Opnel5aKBz",
"vendor_id": "Opnel5aKBz",
"first_name": "Harry",
"last_name": "Windsor",
"contact_key": "JD0X52bkfZlJRiroCJ0tcSiAjsJTntZ5uqKdiZ0a",
"confirmation_code": "333-sdjkh34gbasd",
"phone": "555-123-1234",
"custom_value1": "2022-10-10",
"custom_value2": "$1000",
"email": "harry@windsor.com",
"email_verified_at": 134341234234,
"password": "*****",
"is_primary": true,
"created_at": 134341234234,
"updated_at": 134341234234,
"deleted_at": 134341234234,
"send_email": true
}
],
"name": "Harry cafe de wheels",
"classification": "individual",
"website": "www.harry.com",
"private_notes": "Shhh, do not tell the vendor",
"industry_id": "1",
"phone": "555-3434-3434",
"currency_id": "4",
"number": "11234",
"is_deleted": true,
"language_id": "1",
"vendor_hash": "aaa-sss-www",
"transaction_name": "aaa-sss-www",
"last_login": 134341234234,
"created_at": 134341234234,
"updated_at": 134341234234,
"display_name": "Bob the vendor",
"public_notes": "These are public notes visible to vendors",
"routing_id": "0088:12345678901"
}Changes
- info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status
- info
- info
added the optional property
//to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status
- info