|
79 | 79 | $ref: "#/responses/415Error"
|
80 | 80 | 422:
|
81 | 81 | $ref: "#/responses/422Error"
|
| 82 | +patch: |
| 83 | + summary: Update/create several family variants |
| 84 | + operationId: "patch_families__family_code__variants" |
| 85 | + tags: |
| 86 | + - Families |
| 87 | + x-versions: |
| 88 | + - 2.0 |
| 89 | + description: This endpoint allows you to update and/or create several family variants at once, for a given family. |
| 90 | + x-body-by-line: Contains several lines, each line is a family in JSON standard format |
| 91 | + parameters: |
| 92 | + - $ref: '#/parameters/family_code' |
| 93 | + - name: body |
| 94 | + in: body |
| 95 | + schema: |
| 96 | + $ref: "#/definitions/FamilyVariant" |
| 97 | + x-examples: |
| 98 | + x-example-1: |
| 99 | + '{"code": "shoes_by_size", "variant_attribute_sets": [{"level": 1, "axes": ["size"], "attributes": ["color"]}]}' |
| 100 | + x-example-2: |
| 101 | + '{"code": "shoes_by_color","labels": {"en_US": "Shoes by color"}}' |
| 102 | + x-example-3: |
| 103 | + '{"code": "shoes_without_axes", "variant_attribute_sets": [{"level": 1, "axes": [], "attributes": ["color"]}]}' |
| 104 | + responses: |
| 105 | + 200: |
| 106 | + description: OK |
| 107 | + x-details: Returns a plain text response whose lines are JSON containing the status of each update or creation |
| 108 | + x-no-entity: true |
| 109 | + schema: |
| 110 | + $ref: "#/definitions/ErrorByLine" |
| 111 | + examples: |
| 112 | + x-example-1: |
| 113 | + '{"line":1,"code":"shoes_by_size","status_code":201}' |
| 114 | + x-example-2: |
| 115 | + '{"line":2,"code":"shoes_by_color","status_code":204}' |
| 116 | + x-example-3: |
| 117 | + '{"line":3,"code":"mug","status_code":422, "message":"There should be at least one attribute defined as axis for the attribute set for level "1""}' |
| 118 | + 401: |
| 119 | + $ref: "#/responses/401Error" |
| 120 | + 403: |
| 121 | + $ref: "#/responses/403Error" |
| 122 | + 413: |
| 123 | + $ref: "#/responses/413Error" |
| 124 | + 415: |
| 125 | + $ref: "#/responses/415ErrorStream" |
0 commit comments