Skip to main content

Historical contract: Create Site

Historical API contract. This page describes an earlier API contract. Methods, paths, and responses may differ from the current API.

Historical meaning​

Create Site

This API endpoint is used to create a new site.

Current API​

For new integrations, use the linked current API reference or guide.

Read the current guide

Parameters​

[
{
"name": "language",
"in": "path",
"schema": {
"type": "string",
"default": "en"
},
"required": true
},
{
"name": "project",
"in": "path",
"schema": {
"type": "string",
"default": "<redacted-personal>"
},
"required": true
},
{
"name": "api_version",
"in": "path",
"schema": {
"type": "string",
"default": "v400"
},
"required": true
}
]

Request body​

{
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"name",
"code"
],
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"code": {
"type": "string"
},
"url": {
"type": "string"
},
"logo": {
"type": "string"
},
"header": {
"type": "string"
},
"social_share": {
"type": "string"
},
"reset_password_url_template": {
"type": "string"
},
"track_order_url_template": {
"type": "string"
},
"checkout_url_template": {
"type": "string"
},
"cart_url_template": {
"type": "string"
},
"business_url_template": {
"type": "string"
},
"category_url_template": {
"type": "string"
},
"product_url_template": {
"type": "string"
},
"profile_url_template": {
"type": "string"
}
}
}
}
}
}

Responses​

{
"200": {
"description": "200",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{\n \"error\": false,\n \"result\": {\n \"name\": \"<redacted-personal>\",\n \"code\": \"test_app\",\n \"header\": \"header logo URL\",\n \"social_share\": \"social share URL\",\n \"updated_at\": \"2021-10-29 15:12:44\",\n \"created_at\": \"2021-10-29 15:12:44\",\n \"id\": 38\n }\n}"
}
},
"schema": {
"type": "object",
"properties": {
"error": {
"type": "boolean",
"example": false,
"default": true
},
"result": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "<redacted-personal>"
},
"code": {
"type": "string",
"example": "test_app"
},
"header": {
"type": "string",
"example": "header logo URL"
},
"social_share": {
"type": "string",
"example": "social share URL"
},
"updated_at": {
"type": "string",
"example": "2021-10-29 15:12:44"
},
"created_at": {
"type": "string",
"example": "2021-10-29 15:12:44"
},
"id": {
"type": "integer",
"example": 38,
"default": 0
}
}
}
}
}
}
}
},
"400": {
"description": "400",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{}"
}
},
"schema": {
"type": "object",
"properties": {}
}
}
}
}
}