Create a Supplier
1 min
POST
https://api.fictive.com/REST/api/suppliers
Header Parameters
- X-TokenIdstringDescription
- X-SessionIdstringDescription
- X-VersionstringrequiredDescription
- OriginstringDescription
Body Parameters
- supplierRequestFictiveGlobal.Api.Rest.Dtos.v1.SupplierRequestrequired
- namestring
- statusstring
- contactEmailstring
- contactPhonestring
Responses
201
- FictiveGlobal.Api.Rest.Dtos.v1.SupplierResponse
- supplierReferencestring
- namestring
- statusstring
- contactEmailstring
- contactPhonestring
400
401
404
409
412
500
curl
curl --request POST \
--url https://api.fictive.com/REST/api/suppliers \
--header 'accept: application/json' \
--header 'x-version: string'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
myHeaders.append("x-version", "string");
var requestOptions = {
method: 'POST',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.fictive.com/REST/api/suppliers", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.fictive.com/REST/api/suppliers")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request["x-version"] = "string"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.fictive.com/REST/api/suppliers"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json',
'x-version': 'string'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
201
{
"supplierReference": "001SU3ACFZVKUSJLT3",
"name": "Test Supplier",
"status": "Active",
"contactEmail": "[email protected]",
"contactPhone": "01234567890"
}400
// Validation error
401
// Not Authorized
404
// Not Found
409
// A Supplier exists with the provided name
412
// Invalid Status provided
500
// Internal Server Error
Have a question?
Our super-smart AI, knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.