application/json
POST
/V1/inventory/sources
cURL (application/json)
curl \
--request POST 'https://magento2.winkelstraat.mac/rest/all/V1/inventory/sources' \
--header "Content-Type: application/json" \
--data '{"source":{"source_code":"string","name":"string","email":"string","contact_name":"string","enabled":true,"description":"string","latitude":42.0,"longitude":42.0,"country_id":"string","region_id":42,"region":"string","city":"string","street":"string","postcode":"string","phone":"string","fax":"string","use_default_carrier_config":true,"carrier_links":[{"carrier_code":"string","position":42,"extension_attributes":{}}],"extension_attributes":{"is_pickup_location_active":true,"frontend_name":"string","frontend_description":"string"}}}'
curl \
--request POST 'https://magento2.winkelstraat.mac/rest/all/V1/inventory/sources' \
--header "Content-Type: application/xml"
Request examples
{
"source": {
"source_code": "string",
"name": "string",
"email": "string",
"contact_name": "string",
"enabled": true,
"description": "string",
"latitude": 42.0,
"longitude": 42.0,
"country_id": "string",
"region_id": 42,
"region": "string",
"city": "string",
"street": "string",
"postcode": "string",
"phone": "string",
"fax": "string",
"use_default_carrier_config": true,
"carrier_links": [
{
"carrier_code": "string",
"position": 42,
"extension_attributes": {}
}
],
"extension_attributes": {
"is_pickup_location_active": true,
"frontend_name": "string",
"frontend_description": "string"
}
}
}
Request examples
<?xml version="1.0" encoding="UTF-8"?>
<root>
<source>
<source-code>string</source-code>
<name>string</name>
<email>string</email>
<contact-name>string</contact-name>
<enabled type="boolean">true</enabled>
<description>string</description>
<latitude type="float">42.0</latitude>
<longitude type="float">42.0</longitude>
<country-id>string</country-id>
<region-id type="integer">42</region-id>
<region>string</region>
<city>string</city>
<street>string</street>
<postcode>string</postcode>
<phone>string</phone>
<fax>string</fax>
<use-default-carrier-config type="boolean">true</use-default-carrier-config>
<carrier-links type="array">
<carrier-link>
<carrier-code>string</carrier-code>
<position type="integer">42</position>
<extension-attributes>
</extension-attributes>
</carrier-link>
</carrier-links>
<extension-attributes>
<is-pickup-location-active type="boolean">true</is-pickup-location-active>
<frontend-name>string</frontend-name>
<frontend-description>string</frontend-description>
</extension-attributes>
</source>
</root>
Response examples (401)
{
"message": "string",
"errors": [
{
"message": "string",
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
]
}
],
"code": 42,
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
],
"trace": "string"
}
Response examples (401)
<?xml version="1.0" encoding="UTF-8"?>
<root>
<message>string</message>
<errors type="array">
<error>
<message>string</message>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
</error>
</errors>
<code type="integer">42</code>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
<trace>string</trace>
</root>
Response examples (400)
{
"message": "string",
"errors": [
{
"message": "string",
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
]
}
],
"code": 42,
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
],
"trace": "string"
}
Response examples (400)
<?xml version="1.0" encoding="UTF-8"?>
<root>
<message>string</message>
<errors type="array">
<error>
<message>string</message>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
</error>
</errors>
<code type="integer">42</code>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
<trace>string</trace>
</root>
Response examples (default)
{
"message": "string",
"errors": [
{
"message": "string",
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
]
}
],
"code": 42,
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
],
"trace": "string"
}
Response examples (default)
<?xml version="1.0" encoding="UTF-8"?>
<root>
<message>string</message>
<errors type="array">
<error>
<message>string</message>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
</error>
</errors>
<code type="integer">42</code>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
<trace>string</trace>
</root>