Add an item.
1 min
POST
https://api.example.com/v1/item
Body Parameters
- bodyundefined
- objectitem1
- idintegerExample
- titlestringExample
- objectitem2
- idintegerExample
- titlestringExample
- descriptionstringExample
- typestring<primary | secondary>
Responses
200
curl
curl --location 'https://api.example.com/v1/item' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '""'javascript
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify("");
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.example.com/v1/item", 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.example.com/v1/item")
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.body = JSON.dump("")
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.example.com/v1/item"
payload = json.dumps("")
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// OK
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.