/warehouses/create v1.0.0
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Base URLs:
Warehouses
postWarehousesCreate
Code samples
const inputBody = '{
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "The name of the contact, must be a non-empty string."
},
"code": {
"type": "string",
"description": "The code associated with the contact.",
"nullable": true
},
"phoneNumber": {
"type": "string",
"description": "The phone number of the contact.",
"nullable": true
},
"country": {
"type": "string",
"description": "The country of the contact.",
"nullable": true
},
"address1": {
"type": "string",
"description": "The first line of the address of the contact.",
"nullable": true
},
"address2": {
"type": "string",
"description": "The second line of the address of the contact.",
"nullable": true
},
"city": {
"type": "string",
"description": "The city of the contact.",
"nullable": true
},
"region": {
"type": "string",
"description": "The region of the contact.",
"nullable": true
},
"postalCode": {
"type": "string",
"description": "The postal code of the contact.",
"nullable": true
},
"contact": {
"type": "string",
"description": "Additional contact information.",
"nullable": true
}
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://goldleaf.app/api/v1/warehouses/create',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /warehouses/create
Create a warehouse
Creates a warehouse for the organization.
Body parameter
{
"type": "object",
"required": ["name"],
"properties": {
"name": {
"type": "string",
"description": "The name of the contact, must be a non-empty string."
},
"code": {
"type": "string",
"description": "The code associated with the contact.",
"nullable": true
},
"phoneNumber": {
"type": "string",
"description": "The phone number of the contact.",
"nullable": true
},
"country": {
"type": "string",
"description": "The country of the contact.",
"nullable": true
},
"address1": {
"type": "string",
"description": "The first line of the address of the contact.",
"nullable": true
},
"address2": {
"type": "string",
"description": "The second line of the address of the contact.",
"nullable": true
},
"city": {
"type": "string",
"description": "The city of the contact.",
"nullable": true
},
"region": {
"type": "string",
"description": "The region of the contact.",
"nullable": true
},
"postalCode": {
"type": "string",
"description": "The postal code of the contact.",
"nullable": true
},
"contact": {
"type": "string",
"description": "Additional contact information.",
"nullable": true
}
}
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | object | true | none |
| » name | body | string | true | The name of the contact, must be a non-empty string. |
| » code | body | string¦null | false | The code associated with the contact. |
| » phoneNumber | body | string¦null | false | The phone number of the contact. |
| » country | body | string¦null | false | The country of the contact. |
| » address1 | body | string¦null | false | The first line of the address of the contact. |
| » address2 | body | string¦null | false | The second line of the address of the contact. |
| » city | body | string¦null | false | The city of the contact. |
| » region | body | string¦null | false | The region of the contact. |
| » postalCode | body | string¦null | false | The postal code of the contact. |
| » contact | body | string¦null | false | Additional contact information. |
Example responses
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | the newly created item | None |
