Skip to content

Commit 7375cdc

Browse files
committed
Updated API from documentation release
1 parent 4737d71 commit 7375cdc

22 files changed

+260
-182
lines changed

api-specs/api/types/product/ProductDraft.raml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ properties:
2323
description: |
2424
User-defined unique identifier for the Product.
2525
26-
This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing Products with the [Import API](/../import-export/) and the [Merchant Center](/../merchant-center/import-data).
26+
This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing Products with the [Import API](/../api/import-export/) and the [Merchant Center](/../merchant-center/import-data).
2727
2828
To update a Product using the Import API or Merchant Center, the Product `key` must match the pattern `^[A-Za-z0-9_-]{2,256}$`.
2929
description?:

api-specs/api/types/product/updates/ProductSetKeyAction.raml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ properties:
1010
description: |
1111
Value to set. If empty, any existing value will be removed.
1212
13-
To update a Product using the [Import API](/../import-export/) and the [Merchant Center](/../merchant-center/import-data), the Product `key` must match the pattern `^[A-Za-z0-9_-]{2,256}$`.
13+
To update a Product using the [Import API](/../api/import-export/) and the [Merchant Center](/../merchant-center/import-data), the Product `key` must match the pattern `^[A-Za-z0-9_-]{2,256}$`.

api-specs/connect/types/types.raml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,3 @@ DeploymentApplicationRequiredError: !include error/DeploymentApplicationRequired
7171
DeploymentUnknownGlobalConfigurationKeyError: !include error/DeploymentUnknownGlobalConfigurationKeyError.raml
7272
DeploymentMissingGlobalConfigurationKeyError: !include error/DeploymentMissingGlobalConfigurationKeyError.raml
7373
DeploymentEmptyRequiredGlobalConfigurationKeyError: !include error/DeploymentEmptyRequiredGlobalConfigurationKeyError.raml
74-

api-specs/import/api.raml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ baseUri: https://import.europe-west1.gcp.commercetools.com
1919
- eastus.azure
2020
- germanywestcentral.azure
2121
description: |
22-
The [Region](/hosts-and-authorization#hosts) in which the Project is hosted.
22+
The [Region](/import-export/hosts-and-authorization#hosts) in which the Project is hosted.
2323
(annotations.serviceRegions):
2424
- uri: https://import.us-central1.gcp.commercetools.com/
2525
region: us-central1
@@ -531,7 +531,7 @@ traits:
531531
post:
532532
description: |
533533
Creates a new import request for Product Variant Patches.
534-
Returns an [InvalidField](/error#invalidfielderror) error if the [ProductVariantPatchRequest](ctp:import:type:ProductVariantPatchRequest) contains patches with and without the `product` field set.
534+
Returns an [InvalidField](ctp:import:type:InvalidFieldError) error if the [ProductVariantPatchRequest](ctp:import:type:ProductVariantPatchRequest) contains patches with and without the `product` field set.
535535
is:
536536
- secured_by_manage_products
537537
body:

api-specs/import/types/category-import.raml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ uses:
1010
types:
1111
CategoryImport:
1212
description: |
13-
The data representation for a Category to be imported that is persisted as a [Category](/../api/projects/categories#category) in the Project.
13+
The data representation for a Category to be imported that is persisted as a [Category](ctp:api:type:Category) in the Project.
1414
type: common.ImportResource
1515
properties:
1616
key:
1717
type: string
18-
description: User-defined unique identifier. If a [Category](/../api/projects/categories#category) with this `key` exists, it will be updated with the imported data.
18+
description: User-defined unique identifier. If a [Category](ctp:api:type:Category) with this `key` exists, it will be updated with the imported data.
1919
pattern: ^[A-Za-z0-9_-]+$
2020
minLength: 2
2121
maxLength: 256
@@ -35,8 +35,8 @@ types:
3535
parent?:
3636
description: |
3737
Maps to `Category.parent`.
38-
The Reference to the parent [Category](/../api/projects/categories#category) with which the Category is associated.
39-
If referenced Category does not exist, the `state` of the [ImportOperation](/import-operation#importoperation) will be set to `unresolved` until the necessary Category is created.
38+
The Reference to the parent [Category](ctp:api:type:Category) with which the Category is associated.
39+
If referenced Category does not exist, the `state` of the [ImportOperation](ctp:import:type:ImportOperation) will be set to `unresolved` until the necessary Category is created.
4040
type: common.CategoryKeyReference
4141
orderHint?:
4242
description: |
@@ -59,6 +59,8 @@ types:
5959
Maps to `Category.metaKeywords`.
6060
type: common.LocalizedString
6161
assets?:
62+
description: |
63+
Maps to `Category.assets`.
6264
type: common.Asset[]
6365
custom?:
6466
description: The custom fields for this Category.

api-specs/import/types/common.raml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,14 @@ types:
209209
properties:
210210
container: string
211211
UnresolvedReferences:
212+
description: References a resource which could not be resolved.
212213
properties:
213-
key: string
214-
typeId: ReferenceType
214+
key:
215+
type: string
216+
description: The `key` of the resource.
217+
typeId:
218+
type: ReferenceType
219+
description: The type of resource.
215220
MoneyType:
216221
type: string
217222
enum:
@@ -245,6 +250,7 @@ types:
245250
properties:
246251
value:
247252
type: TypedMoney
253+
description: Money value of the discounted price.
248254
discount:
249255
description: Reference to a ProductDiscount.
250256
type: ProductDiscountKeyReference
@@ -344,7 +350,7 @@ types:
344350
- key-value-document
345351
ProcessingState:
346352
description: |
347-
Every [Import Operation](/import-operation) is assigned one of the following states.
353+
Every [Import Operation](ctp:import:type:ImportOperation) is assigned one of the following states.
348354
(annotations.enumDescriptions):
349355
processing: The initial state assigned if the request payload (JSON structure and fields) meets Import API specifications. The resource import is in progress.
350356
imported: The resource was successfully imported.

api-specs/import/types/customer-import.raml

Lines changed: 98 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -19,47 +19,116 @@ types:
1919
ExternalAuth: If set, the `password` field is optional for the Customer.
2020
CustomerAddress:
2121
description: |
22-
Different from Address in that `key` is required and `id` is not supported.
22+
Different from [Address](/types#address) in that `key` is required and `id` is not supported.
2323
properties:
2424
key:
2525
description: |
2626
User-defined identifier for the address.
2727
Must follow the pattern `[a-zA-Z0-9_\-]{2,256}` and must be unique per customer.
2828
type: string
29-
title?: string
30-
salutation?: string
31-
firstName?: string
32-
lastName?: string
33-
streetName?: string
34-
streetNumber?: string
35-
additionalStreetInfo?: string
36-
postalCode?: string
37-
city?: string
38-
region?: string
39-
state?: string
40-
country: common.CountryCode
41-
company?: string
42-
department?: string
43-
building?: string
44-
apartment?: string
45-
pOBox?: string
46-
phone?: string
47-
mobile?: string
48-
email?: string
49-
fax?: string
50-
additionalAddressInfo?: string
51-
externalId?: string
29+
country:
30+
type: common.CountryCode
31+
description: |
32+
Name of the country.
33+
title?:
34+
type: string
35+
description: |
36+
Title of the contact, for example 'Dr.'
37+
salutation?:
38+
type: string
39+
description: |
40+
Salutation of the contact, for example 'Mr.' or 'Ms.'
41+
firstName?:
42+
type: string
43+
description: |
44+
Given name (first name) of the contact.
45+
lastName?:
46+
type: string
47+
description: |
48+
Family name (last name) of the contact.
49+
streetName?:
50+
type: string
51+
description: |
52+
Name of the street.
53+
streetNumber?:
54+
type: string
55+
description: |
56+
Street number.
57+
additionalStreetInfo?:
58+
type: string
59+
description: |
60+
Further information on the street address.
61+
postalCode?:
62+
type: string
63+
description: |
64+
Postal code.
65+
city?:
66+
type: string
67+
description: |
68+
Name of the city.
69+
region?:
70+
type: string
71+
description: |
72+
Name of the region.
73+
state?:
74+
type: string
75+
description: |
76+
Name of the state, for example, Colorado.
77+
company?:
78+
type: string
79+
description: |
80+
Name of the company.
81+
department?:
82+
type: string
83+
description: |
84+
Name of the department.
85+
building?:
86+
type: string
87+
description: |
88+
Number or name of the building.
89+
apartment?:
90+
type: string
91+
description: |
92+
Number or name of the apartment.
93+
pOBox?:
94+
type: string
95+
description: |
96+
Post office box number.
97+
phone?:
98+
type: string
99+
description: |
100+
Phone number of the contact.
101+
mobile?:
102+
type: string
103+
description: |
104+
Mobile phone number of the contact.
105+
email?:
106+
type: string
107+
description: |
108+
Email address of the contact.
109+
fax?:
110+
type: string
111+
description: |
112+
Fax number of the contact.
113+
additionalAddressInfo?:
114+
type: string
115+
description: |
116+
Further information on the Address.
117+
externalId?:
118+
type: string
119+
description: |
120+
ID for the contact used in an external system.
52121
custom?:
53122
description: Custom Fields for the address.
54123
type: custom-field.Custom
55124
CustomerImport:
56125
description: |
57-
The data representation for a Customer to be imported that is persisted as a [Customer](/../api/projects/customers#top) in the Project.
126+
The data representation for a Customer to be imported that is persisted as a [Customer](ctp:api:type:Customer) in the Project.
58127
type: common.ImportResource
59128
properties:
60129
key:
61130
type: string
62-
description: User-defined unique identifier. If a [Customer](/../api/projects/customers#customer) with this `key` exists, it will be updated with the imported data.
131+
description: User-defined unique identifier. If a [Customer](ctp:api:type:Customer) with this `key` exists, it will be updated with the imported data.
63132
pattern: ^[A-Za-z0-9_-]+$
64133
minLength: 2
65134
maxLength: 256
@@ -77,7 +146,7 @@ types:
77146
type: string
78147
stores?:
79148
description: |
80-
The References to the Stores with which the Customer is associated. If referenced Stores do not exist, the `state` of the [ImportOperation](/import-operation#importoperation) will be set to `unresolved` until the necessary Stores are created.
149+
The References to the Stores with which the Customer is associated. If referenced Stores do not exist, the `state` of the [ImportOperation](ctp:import:type:ImportOperation) will be set to `unresolved` until the necessary Stores are created.
81150
type: common.StoreKeyReference[]
82151
firstName?:
83152
description: |
@@ -121,8 +190,8 @@ types:
121190
type: boolean
122191
customerGroup?:
123192
description: |
124-
The Reference to the [CustomerGroup](/../api/projects/customerGroups#customergroup) with which the Customer is associated.
125-
If referenced CustomerGroup does not exist, the `state` of the [ImportOperation](/import-operation#importoperation) will be set to `unresolved` until the necessary CustomerGroup is created.
193+
The Reference to the [CustomerGroup](ctp:api:type:CustomerGroup) with which the Customer is associated.
194+
If referenced CustomerGroup does not exist, the `state` of the [ImportOperation](ctp:import:type:ImportOperation) will be set to `unresolved` until the necessary CustomerGroup is created.
126195
type: common.CustomerGroupKeyReference
127196
addresses?:
128197
description: |

api-specs/import/types/discount-code-import.raml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ types:
3232
description: |
3333
User-defined unique identifier of the DiscountCode that is used by the customer to apply the discount.
3434
35-
The value cannot be updated. Attempting to update the value will result in an [InvalidFieldsUpdate](/error#invalidfieldsupdateerror) error.
35+
The value cannot be updated. Attempting to update the value will result in an [InvalidFieldsUpdate](/import-export/error#invalidfieldsupdateerror) error.
3636
type: string
3737
cartDiscounts:
3838
description: |

api-specs/import/types/error.raml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,17 @@ types:
3434
The errors that caused this error response.
3535
type: ErrorObject[]
3636
ErrorObject:
37-
description:
37+
description: |
38+
Base representation of an error response containing common fields to all errors.
39+
40+
An error response may contain additional fields depending on the type of an error, for example, `attribute` in [DuplicateAttributeValueError](#duplicateattributevalueerror).
3841
discriminator: code
3942
properties:
4043
code:
44+
description: An error identifier.
4145
type: string
4246
message:
43-
description:
47+
description: A plain language description of the cause of an error.
4448
type: string
4549
AccessDeniedError:
4650
description: This is the generic error code for access denied. In case of a wrong scope, an [InvalidScopeError](#invalidscopeerror) will be returned.
@@ -58,15 +62,15 @@ types:
5862
type: ErrorObject
5963
discriminatorValue: InvalidOperation
6064
DuplicateAttributeValueError:
61-
description: The `Unique` [AttributeConstraintEnum](/../api/projects/productTypes#attributeconstraintenum) was violated.
65+
description: The `Unique` [AttributeConstraintEnum](ctp:api:type:AttributeConstraintEnum) was violated.
6266
type: ErrorObject
6367
discriminatorValue: DuplicateAttributeValue
6468
properties:
6569
attribute:
6670
description: The attribute in conflict.
6771
type: product-variant-import.Attribute
6872
DuplicateAttributeValuesError:
69-
description: The `CombinationUnique` [AttributeConstraintEnum](/../api/projects/productTypes#attributeconstraintenum) was violated.
73+
description: The `CombinationUnique` [AttributeConstraintEnum](ctp:api:type:AttributeConstraintEnum) was violated.
7074
type: ErrorObject
7175
discriminatorValue: DuplicateAttributeValues
7276
properties:
@@ -85,8 +89,8 @@ types:
8589
type: any
8690
DuplicateVariantValuesError:
8791
description: |
88-
The given combination of values of a [Product Variant](/../api/projects/products#productvariant) conflicts with an existing one.
89-
Every [Product Variant](/../api/projects/products#productvariant) must have a distinct combination of SKU, prices, and custom attribute values.
92+
The given combination of values of a [Product Variant](ctp:api:type:ProductVariant) conflicts with an existing one.
93+
Every [Product Variant](ctp:api:type:ProductVariant) must have a distinct combination of SKU, prices, and custom attribute values.
9094
type: ErrorObject
9195
discriminatorValue: DuplicateVariantValues
9296
properties:
@@ -113,7 +117,7 @@ types:
113117
InvalidFieldError:
114118
description: |
115119
A given field is not supported.
116-
This error occurs, for example, if the field `variants`, which is not supported by [Product Import](/product#productimport), is sent to the Product Import endpoint.
120+
This error occurs, for example, if the field `variants`, which is not supported by [Product Import](ctp:import:type:ProductImport), is sent to the Product Import endpoint.
117121
type: ErrorObject
118122
discriminatorValue: InvalidField
119123
properties:

api-specs/import/types/import-operation.raml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ types:
1717
type: integer
1818
format: long
1919
importContainerKey:
20-
description: The key of the [importContainer](/import-container#importcontainer).
20+
description: The key of the [ImportContainer](ctp:import:type:ImportContainer).
2121
type: string
2222
resourceKey:
2323
description: The key of the resource.
@@ -35,7 +35,7 @@ types:
3535
format: long
3636
errors?:
3737
description: |
38-
Contains an error if the import of the resource was not successful. See [Errors](/error).
38+
Contains an error if the import of the resource was not successful. See [Errors](/import-export/error).
3939
type: error.ErrorObject[]
4040
unresolvedReferences?:
4141
description: |
@@ -98,5 +98,5 @@ types:
9898
errors?:
9999
description: |
100100
The validation errors for the [ImportOperation](#importoperation).
101-
See [Errors](/error).
101+
See [Errors](/import-export/error).
102102
type: error.ErrorObject[]

0 commit comments

Comments
 (0)