|  | 
|  | 1 | +displayName: Discount Codes | 
|  | 2 | +/{cartIdentifier}/apply | 
|  | 3 | +    post: | 
|  | 4 | +        displayName: Apply discount to cart | 
|  | 5 | +        description: Applies a discount associated with given discount code | 
|  | 6 | +        headers: | 
|  | 7 | +            Accept: | 
|  | 8 | +                description: Specifies the expected response type. If set, the list is returned in XML or JSON format. | 
|  | 9 | +                example: | | 
|  | 10 | +                    application/vnd.ibexa.api.DiscountCode+json | 
|  | 11 | +            Content-Type: | 
|  | 12 | +                description: Specifies the input type. | 
|  | 13 | +                example: | | 
|  | 14 | +                    application/vnd.ibexa.api.DiscountCode+json | 
|  | 15 | +        body: | 
|  | 16 | +            application/vnd.ibexa.api.DiscountCode+json: | 
|  | 17 | +                type: DiscountCode | 
|  | 18 | +                example: !include examples/discount_codes/apply/POST/DiscountCode.json.example | 
|  | 19 | +        responses: | 
|  | 20 | +            200: | 
|  | 21 | +                description: Action executed successfuly. | 
|  | 22 | +                body: | 
|  | 23 | +                    application/vnd.ibexa.api.DiscountCode+json: | 
|  | 24 | +                        type: DiscountCode | 
|  | 25 | +                        example: !include examples/discount_codes/apply/POST/DiscountCode.json.example | 
|  | 26 | +            400: | 
|  | 27 | +                description: Error - the request is invalid. | 
|  | 28 | +            404: | 
|  | 29 | +                description: Error - the given cart identifier was not found, or the discount code does not exist. | 
|  | 30 | +            429: | 
|  | 31 | +                description: Error - the request was throttled due to too many requests in a short time. | 
|  | 32 | + | 
|  | 33 | +/{cartIdentifier}/drop | 
|  | 34 | +    post: | 
|  | 35 | +        displayName: Remove discount from cart | 
|  | 36 | +        description: Removes the discount associated with given discount code from the cart | 
|  | 37 | +        headers: | 
|  | 38 | +            Accept: | 
|  | 39 | +                description: Specifies the expected response type. Only JSON is supported. | 
|  | 40 | +                example: | | 
|  | 41 | +                    application/vnd.ibexa.api.DiscountCode+json | 
|  | 42 | +            Content-Type: | 
|  | 43 | +                description: Specifies the input type. Only JSON is supported. | 
|  | 44 | +                example: | | 
|  | 45 | +                    application/vnd.ibexa.api.DiscountCode+json | 
|  | 46 | +        body: | 
|  | 47 | +            application/vnd.ibexa.api.DiscountCode+json: | 
|  | 48 | +                type: DiscountCode | 
|  | 49 | +                example: !include examples/discount_codes/apply/POST/DiscountCode.json.example | 
|  | 50 | +        responses: | 
|  | 51 | +            204: | 
|  | 52 | +                description: Discount code with given discount code was removed from the cart. | 
|  | 53 | +            400: | 
|  | 54 | +                description: Error - the request is invalid. | 
|  | 55 | +            404: | 
|  | 56 | +                description: Error - the given cart identifier was not found | 
0 commit comments