swagger: '2.0'
info:
version: '1.0'
title: NewStore address Import Schemas API
description: NewStore public APIs
contact:
email: support@newstore.com
name: NewStore API Support
url: https://developer.newstore.com
host: dodici-demo.p.newstore.net
basePath: /
schemes:
- https
consumes:
- application/json
produces:
- application/json
security: []
tags:
- name: Import Schemas
description: Import Schemas
paths:
/catalog/import-schemas:
post:
description: "Create new schema object containing jsonschema of [version 7](https://json-schema.org/draft-07/json-schema-release-notes).\nThis schema is used during import process to validate entity object before persisting it in catalog indexes.\nValid jsonschema file\n * is validated against [meta schema](https://json-schema.org/draft-07/schema)\n * references only properties mentioned in whitelist\n * #ref points only to local resource, e.g. external resources are not allowed.\n\nHere is list of whitelisted fields that can be used in schema (case sensitive):\n- brand (string, may be null)\n- title (string, may be null)\n- caption (string, may be null)\n- description (string, may be null)\n- keywords (array of strings, may be null)\n- product_id (string, max size 255, cannot contain characters `=%`)\n- variant_group_id (string, max size 255)\n- template_id (string, may be null)\n- tax_class_id (string, may be null)\n- schedule_b (string, may be null, [definition](https://usacustomsclearance.com/process/hts-code-vs-hs-code))\n- product_hts_number (string, may be null)\n- google_category (string, may be null)\n- preorder_start (time RFC 3339 string, may be null)\n- online_to (time RFC 3339 string, may be null)\n- online_from (time RFC 3339 string, may be null)\n- country_of_origin (string, may be null)\n- material (string, may be null)\n- extended_attributes (array of attributes, may be null)\n - name (string, may be null)\n - value (string, may be null)\n- external_identifiers (array of identifiers, may be null)\n - type (string, may be null)\n - value (string, may be null)\n- filterable_attributes (array of attributes, may be null)\n - name (string, may be null)\n - value (string, may be null)\n- searchable_attributes (object contain key value string pairs, may be null )\n - [string] : [string] (name of searchable attribute)\n- shipping_dimension_unit (string, may be null)\n- shipping_dimension_width (number, may be null)\n- shipping_dimension_height (number, may be null)\n- shipping_dimension_length (number, may be null)\n- shipping_weight_value (number, may be null)\n- shipping_weight_unit (string, may be null)\n- variation_additional_1_name (string, may be null)\n- variation_additional_2_name (string, may be null)\n- variation_additional_1_value (string, may be null)\n- variation_additional_2_value (string, may be null)\n- variation_color_value (string, may be null)\n- variation_size_gender (string, may be null)\n- variation_size_system (string, may be null)\n- variation_size_value (string, may be null)\n- variation_size_type (string, may be null)\n"
summary: createImportSchema
tags:
- Import Schemas
operationId: createImportSchema
deprecated: false
produces:
- application/problem+json
- application/json
consumes:
- application/schema+json
parameters:
- name: Content-Type
in: header
required: false
enum:
- application/schema+json
type: string
description: ''
- name: body
in: formData
required: true
type: file
format: file
description: ''
- name: id
in: query
required: false
type: string
minLength: 1
maxLength: 36
pattern: ^[a-zA-Z0-9_-]+$
description: default generated id is returned
- name: entity
in: query
required: false
enum:
- PRODUCTS
type: string
minLength: 1
description: default id PRODUCTS
responses:
default:
description: Unexpected error
schema:
$ref: '#/definitions/Problem'
headers: {}
'201':
description: Created
schema:
$ref: '#/definitions/ImportSchemaCreated'
headers:
Last-Modified:
description: Date when of schema file was lastly modified
type: string
'400':
description: Bad Request
schema:
$ref: '#/definitions/Problem'
headers: {}
'409':
description: Already Exists
schema:
$ref: '#/definitions/Problem'
headers: {}
'429':
description: Too Many Requests
schema:
$ref: '#/definitions/Problem'
headers:
Retry-After:
type: string
'500':
description: Internal Server Error
schema:
$ref: '#/definitions/Problem'
headers: {}
'502':
description: Bad Gateway
schema:
$ref: '#/definitions/Problem'
headers: {}
'503':
description: Service Unavailable
schema:
$ref: '#/definitions/Problem'
headers: {}
security:
- oauth:
- catalog:import-schemas:write
/catalog/import-schemas/{id}:
delete:
description: ''
summary: destroyImportSchema
tags:
- Import Schemas
operationId: destroyImportSchema
deprecated: false
produces:
- application/problem+json
parameters:
- name: id
in: path
required: true
type: string
minLength: 1
maxLength: 36
pattern: ^[a-zA-Z0-9_-]+$
description: ''
responses:
default:
description: Unexpected error
schema:
$ref: '#/definitions/Problem'
headers: {}
'204':
description: No Content
headers: {}
'404':
description: Not Found
headers: {}
'429':
description: Too Many Requests
schema:
$ref: '#/definitions/Problem'
headers:
Retry-After:
type: string
'500':
description: Internal Server Error
schema:
$ref: '#/definitions/Problem'
headers: {}
'502':
description: Bad Gateway
schema:
$ref: '#/definitions/Problem'
headers: {}
'503':
description: Service Unavailable
schema:
$ref: '#/definitions/Problem'
headers: {}
security:
- oauth:
- catalog:import-schemas:write
get:
description: ''
summary: showImportSchema
tags:
- Import Schemas
operationId: showImportSchema
deprecated: false
produces:
- application/problem+json
- application/json
- application/schema+json
parameters:
- name: id
in: path
required: true
type: string
minLength: 1
maxLength: 36
pattern: ^[a-zA-Z0-9_-]+$
description: ''
responses:
default:
description: Unexpected error
schema:
$ref: '#/definitions/Problem'
headers: {}
'200':
description: OK
schema:
$ref: '#/definitions/ImportSchemaGet'
headers:
Last-Modified:
description: Date Time when of schema file was lastly modified
type: string
'400':
description: Bad Request
schema:
$ref: '#/definitions/Problem'
headers: {}
'404':
description: Not Found
schema:
$ref: '#/definitions/Problem'
headers: {}
'429':
description: Too Many Requests
schema:
$ref: '#/definitions/Problem'
headers:
Retry-After:
type: string
'500':
description: Internal Server Error
schema:
$ref: '#/definitions/Problem'
headers: {}
'502':
description: Bad Gateway
schema:
$ref: '#/definitions/Problem'
headers: {}
'503':
description: Service Unavailable
schema:
$ref: '#/definitions/Problem'
headers: {}
security:
- oauth:
- catalog:import-schemas:read
patch:
description: ''
summary: updateImportSchema
tags:
- Import Schemas
operationId: updateImportSchema
deprecated: false
produces:
- application/problem+json
consumes:
- application/schema+json
parameters:
- name: id
in: path
required: true
type: string
minLength: 1
maxLength: 36
pattern: ^[a-zA-Z0-9_-]+$
description: ''
- name: Content-Type
in: header
required: false
enum:
- application/schema+json
type: string
description: ''
- name: body
in: formData
required: true
type: file
format: file
description: ''
responses:
default:
description: Unexpected error
schema:
$ref: '#/definitions/Problem'
headers: {}
'204':
description: Updated
headers:
Last-Modified:
description: Date Time when of schema file was lastly modified
type: string
'400':
description: Bad Request
schema:
$ref: '#/definitions/Problem'
headers: {}
'404':
description: Not Found
schema:
$ref: '#/definitions/Problem'
headers: {}
'429':
description: Too Many Requests
schema:
$ref: '#/definitions/Problem'
headers:
Retry-After:
type: string
'500':
description: Internal Server Error
schema:
$ref: '#/definitions/Problem'
headers: {}
'502':
description: Bad Gateway
schema:
$ref: '#/definitions/Problem'
headers: {}
'503':
description: Service Unavailable
schema:
$ref: '#/definitions/Problem'
headers: {}
security:
- oauth:
- catalog:import-schemas:write
definitions:
ImportSchemaGet:
title: ImportSchemaGet
type: object
properties:
entity:
type: string
default: PRODUCTS
id:
description: ID of the import schema. It must be unique per tenant and contain only ASCII characters. F.e UUID4, human readable name without spaces
type: string
minLength: 1
maxLength: 36
pattern: ^[a-zA-Z0-9_-]+$
last_updated_at:
description: Timestamp in RFC3339 format.
example: '2020-01-01T00:00:00+00:00'
type: string
format: date-time
required:
- entity
- id
- last_updated_at
ImportSchemaCreated:
title: ImportSchemaCreated
type: object
properties:
id:
description: ID of the import schema. It must be unique per tenant and contain only ASCII characters. F.e UUID4, human readable name without spaces
type: string
minLength: 1
maxLength: 36
pattern: ^[a-zA-Z0-9_-]+$
last_updated_at:
description: Timestamp in RFC3339 format.
example: '2020-01-01T00:00:00+00:00'
type: string
format: date-time
required:
- id
- last_updated_at
Problem:
title: Problem
type: object
properties:
detail:
description: A human readable explanation specific to this occurrence of the problem that is helpful to locate the problem and give advice on how to proceed. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized.
example: some description for the error situation
type: string
error_code:
type: string
instance:
description: A URI reference that identifies the specific occurrence of the problem, e.g. by adding a fragment identifier or sub-path to the problem type. May be used to locate the root of this problem in the source code.
example: /some/uri-reference#specific-occurrence-context
type: string
message:
type: string
messages:
type: array
items:
type: string
request_id:
type: string
status:
description: The HTTP status code generated by the origin server for this occurrence of the problem.
type: integer
minimum: 100.0
maximum: 600.0
exclusiveMaximum: true
format: int32
title:
description: A short summary of the problem type. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized.
example: some title for the error situation
type: string
type:
description: A URI reference that uniquely identifies the problem type only in the context of the provided API. Opposed to the specification in RFC-7807, it is neither recommended to be dereferenceable and point to a human-readable documentation nor globally unique for the problem type.
example: /some/uri-reference
type: string
default: about:blank
securityDefinitions:
oauth:
type: oauth2
flow: application
tokenUrl: https://id.p.newstore.net/auth/realms/dodici-demo/protocol/openid-connect/token
scopes:
catalog:import-schemas:read: Grants privileges to read import schema
catalog:import-schemas:write: Grants privileges to write import schema
catalog:pricebook-export:read: Grants privileges to export pricebook data
catalog:product-export:read: Grants privileges to export product data
checkout:carts:read: Grants privileges to read cart data
checkout:carts:write: Grants privileges to write cart data
clienteling:profile:read: Grants privileges to read clienteling profiles
customer:profile:read: Grants privileges to read API customer data
customer:profile:write: Grants privileges to modify API customer data
newstore:configuration:read: Grants privileges to read configuration
newstore:configuration:write: Grants privileges to write configuration
fiscalization:orders:read: View orders with fiscal transactions and signatures
fiscalization:orders:write: Create orders with fiscal transactions and signatures
shipments:read: Read Shipping Options and Audits
iam:providers:read: ' Grants read privileges to provider resources'
iam:providers:write: ' Grants write privileges to provider resources'
iam:roles:read: ' Grants privileges to read roles data'
iam:roles:write: ' Grants privileges to write roles data'
iam:users:read: ' Grants privileges to read user data'
iam:users:write: ' Grants privileges to write user data'
inventory:reservations:read: Allows access to retrieve reservations
inventory:reservations:write: Allows access to create and update reservations
promotions:config:read: Grants privileges to read configuration
promotions:config:write: Grants privileges to write into configuration
promotions:reason-codes:read: Grants privileges to list reason codes
promotions:reason-codes:write: Grants privileges to create and update reason codes
audit-events:read: Grants read access to the tenant's audit events.
taxes:preview-transactions:write: Preview tax transactions
taxes:transactions:read: Read tax transactions