Add New VendorsΒΆ
To create a new vendor to your account send a POST request to /v1/vendors.
CURL EXAMPLE
1 | curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer 12d3ee8b78ea8d4d09175ebf65c25584d7b269b2" "http://indoproc.com/esourcing/v1/vendors" -D "$REQUEST_BODY"
|
REQUEST HEADERS
1 2 | Content-Type: application/json
Authorization: Bearer 12d3ee8b78ea8d4d09175ebf65c25584d7b269b2
|
REQUEST BODY
These are the attributes that can be added to the object of request body:
| Name | Type | Description |
|---|---|---|
| sup_name | string | Supplier’s company name |
| sup_type | string | Supplier’s Company type (PT, CV, PO, Firma, BUMN, Koperasi) |
| contact_person | string | Supplier company’s contact_person / PIC |
| sup_email | string | contact person / PIC ‘s email |
| sup_phone | string | contact person / PIC ‘s phone number |
| categories | array | vendor’s categories |
These are the sample of Request Body:
1 2 3 4 5 6 7 8 | {
"sup_name" : "Meia Sarah Sehat Makmur",
"sup_type" : "PT",
"contact_person" : "Meia Sarahian",
"sup_email" : "meia@sarah.com",
"sup_phone" : "08996477764",
"categories" : ["Building & Construction", "Elektronik"]
}
|
RESPONSE HEADERS
1 2 | content-type: application/json; charset=utf-8
status: 201 Created
|
RESPONSE BODY
| Name | Type | Description |
|---|---|---|
| _id | integer | The unique identifier for the vendor, you can use this attribute to retrieve the vendor list by sending GET request |
1 2 3 4 5 | {
"vendor": {
"_id": 39
}
}
|