Bulk Set Account Defaults
POST
https://api.monetate.net/api/data/v1/{retailerShortname}/production/bulk-defaultcatalog/
Body Parameters
- bodyDefaultAccountCatalogBulkExample
{ "defaultaccountcatalogs": [ { "account": "123", "schema": "456" }, { "account": "234", "schema": "567" } ] }Description- accountstringrequiredDescription
- schemastringrequiredDescription
Responses
201
- DefaultAccountCatalogBulkCreatedResponse
- metaResponseMetarequired
- codeintegerrequiredExampleDescription
- warningsobject[]Description
- errorsobject[]Description
- dataDefaultAccountCatalogrequiredExample
{ "account": "123", "schema": "456" }Description- accountstringrequiredDescription
- schemastringrequiredDescription
- schema_namestringDescription
- account_domainstringDescription
- account_namestringDescription
401
- Response
- metaResponseMetarequired
- codeintegerrequiredExampleDescription
- warningsobject[]Description
- errorsobject[]Description
- dataResponseAnyDatarequired
403
- Response
- metaResponseMetarequired
- codeintegerrequiredExampleDescription
- warningsobject[]Description
- errorsobject[]Description
- dataResponseAnyDatarequired
404
- Response
- metaResponseMetarequired
- codeintegerrequiredExampleDescription
- warningsobject[]Description
- errorsobject[]Description
- dataResponseAnyDatarequired
500
- Response
- metaResponseMetarequired
- codeintegerrequiredExampleDescription
- warningsobject[]Description
- errorsobject[]Description
- dataResponseAnyDatarequired
curl
curl --request POST \
--url https://api.monetate.net/api/data/v1/{retailerShortname}/production/bulk-defaultcatalog/ \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"account": "",
"schema": ""
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"account": "",
"schema": ""
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.monetate.net/api/data/v1/{retailerShortname}/production/bulk-defaultcatalog/", 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.monetate.net/api/data/v1/{retailerShortname}/production/bulk-defaultcatalog/")
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({
"account": "",
"schema": ""
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.monetate.net/api/data/v1/{retailerShortname}/production/bulk-defaultcatalog/"
payload = json.dumps({
"account": "",
"schema": ""
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
201
// A list of the defaulted product catalogs and accounts
{
"meta": {
"code": 200,
"warnings": [
{}
],
"errors": [
{}
]
},
"data": {
"account": "",
"schema": "",
"schema_name": "",
"account_domain": "",
"account_name": ""
}
}401
// Unauthorized.
The request did not include a token, or the token provided was invalid. Please ensure that your token is correct and that the Authorization header is properly formatted.
{
"meta": {
"code": 200,
"warnings": [
{}
],
"errors": [
{}
]
},
"data": {}
}403
// Forbidden.
The request included a token that has been revoked. Please contact your account administrator to generate a new token.
{
"meta": {
"code": 200,
"warnings": [
{}
],
"errors": [
{}
]
},
"data": {}
}404
// Not found.
The resource you are trying to fetch does not exist, or has been deleted.
{
"meta": {
"code": 200,
"warnings": [
{}
],
"errors": [
{}
]
},
"data": {}
}500
// Unknown error.
Please try again or contact your account manager for more information.
{
"meta": {
"code": 200,
"warnings": [
{}
],
"errors": [
{}
]
},
"data": {}
}