openapi: 3.1.0 info: contact: email: engineering@conekta.com name: Engineering Conekta url: https://github.com/conekta/openapi/issues description: Conekta sdk license: name: MIT-LICENSE url: https://www.apache.org/licenses/LICENSE-2.0.html title: Conekta Antifraud Products API version: 2.2.0 servers: - description: Conekta main server url: https://api.conekta.io security: - bearerAuth: [] tags: - name: Products paths: /orders/{id}/line_items: post: description: Create a new product for an existing order. operationId: ordersCreateProduct parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 explode: false in: path name: id required: true schema: type: string style: simple - description: Use for knowing which language to use examples: es: summary: for spanish request/response value: es en: summary: for english request/response value: en explode: false in: header name: Accept-Language required: false schema: default: es enum: - es - en type: string style: simple - description: In the case of a holding company, the company id of the child company to which will process the request. example: 6441b6376b60c3a638da80af explode: false in: header name: X-Child-Company-Id required: false schema: type: string style: simple requestBody: content: application/json: schema: $ref: '#/components/schemas/product' description: requested field for a product required: true responses: '200': content: application/vnd.conekta-v2.2.0+json: schema: $ref: '#/components/schemas/product_order_response' description: successful '401': content: application/vnd.conekta-v2.2.0+json: example: details: - message: Please include your access key in your request. code: conekta.errors.authentication.missing_key log_id: 507f1f77bcf86cd799439011 object: error type: authentication_error schema: $ref: '#/components/schemas/error' description: authentication error '404': content: application/vnd.conekta-v2.2.0+json: example: details: - message: The resource was not found. code: conekta.errors.resource_not_found.entity debug_message: The object Webhook "641b1d5662d7e00001eaa46b" could not be found. log_id: 641b6c253cd9a50001514fae object: error type: resource_not_found_error schema: $ref: '#/components/schemas/error' description: not found entity '500': content: application/vnd.conekta-v2.2.0+json: example: details: - debug_message: There was a runtime error and Conekta engineers have been notified. message: There was a runtime error and Conekta engineers have been notified. code: conekta.errors.api.system.general_failure object: error type: api_error log_id: 641b6f2b3cd9a50001515098 schema: $ref: '#/components/schemas/error' description: internal server error security: - bearerAuth: [] summary: Create Product tags: - Products /orders/{id}/line_items/{line_item_id}: delete: description: Delete product for an existing orden operationId: ordersDeleteProduct parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 explode: false in: path name: id required: true schema: type: string style: simple - description: identifier example: line_item_2tQ8HkkfbauaKP9Ho explode: false in: path name: line_item_id required: true schema: type: string style: simple - description: Use for knowing which language to use examples: es: summary: for spanish request/response value: es en: summary: for english request/response value: en explode: false in: header name: Accept-Language required: false schema: default: es enum: - es - en type: string style: simple - description: In the case of a holding company, the company id of the child company to which will process the request. example: 6441b6376b60c3a638da80af explode: false in: header name: X-Child-Company-Id required: false schema: type: string style: simple responses: '200': content: application/vnd.conekta-v2.2.0+json: schema: $ref: '#/components/schemas/product_order_response' description: successful '401': content: application/vnd.conekta-v2.2.0+json: example: details: - message: Please include your access key in your request. code: conekta.errors.authentication.missing_key log_id: 507f1f77bcf86cd799439011 object: error type: authentication_error schema: $ref: '#/components/schemas/error' description: authentication error '422': content: application/vnd.conekta-v2.2.0+json: example: details: - message: The token does not exist. param: payment_method.token_id code: conekta.errors.parameter_validation.payment_method.token_id.nonexistent_token debug_message: The token does not exist. log_id: 641b6d813cd9a50001515017 object: error type: parameter_validation_error schema: $ref: '#/components/schemas/error' description: parameter validation error '404': content: application/vnd.conekta-v2.2.0+json: example: details: - message: The resource was not found. code: conekta.errors.resource_not_found.entity debug_message: The object Webhook "641b1d5662d7e00001eaa46b" could not be found. log_id: 641b6c253cd9a50001514fae object: error type: resource_not_found_error schema: $ref: '#/components/schemas/error' description: not found entity '500': content: application/vnd.conekta-v2.2.0+json: example: details: - debug_message: There was a runtime error and Conekta engineers have been notified. message: There was a runtime error and Conekta engineers have been notified. code: conekta.errors.api.system.general_failure object: error type: api_error log_id: 641b6f2b3cd9a50001515098 schema: $ref: '#/components/schemas/error' description: internal server error security: - bearerAuth: [] summary: Delete Product tags: - Products put: description: Update an existing product for an existing orden operationId: ordersUpdateProduct parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 explode: false in: path name: id required: true schema: type: string style: simple - description: identifier example: line_item_2tQ8HkkfbauaKP9Ho explode: false in: path name: line_item_id required: true schema: type: string style: simple - description: Use for knowing which language to use examples: es: summary: for spanish request/response value: es en: summary: for english request/response value: en explode: false in: header name: Accept-Language required: false schema: default: es enum: - es - en type: string style: simple - description: In the case of a holding company, the company id of the child company to which will process the request. example: 6441b6376b60c3a638da80af explode: false in: header name: X-Child-Company-Id required: false schema: type: string style: simple requestBody: content: application/json: schema: $ref: '#/components/schemas/update_product' description: requested field for products required: true responses: '200': content: application/vnd.conekta-v2.2.0+json: schema: $ref: '#/components/schemas/product_order_response' description: successful '401': content: application/vnd.conekta-v2.2.0+json: example: details: - message: Please include your access key in your request. code: conekta.errors.authentication.missing_key log_id: 507f1f77bcf86cd799439011 object: error type: authentication_error schema: $ref: '#/components/schemas/error' description: authentication error '422': content: application/vnd.conekta-v2.2.0+json: example: details: - message: The token does not exist. param: payment_method.token_id code: conekta.errors.parameter_validation.payment_method.token_id.nonexistent_token debug_message: The token does not exist. log_id: 641b6d813cd9a50001515017 object: error type: parameter_validation_error schema: $ref: '#/components/schemas/error' description: parameter validation error '404': content: application/vnd.conekta-v2.2.0+json: example: details: - message: The resource was not found. code: conekta.errors.resource_not_found.entity debug_message: The object Webhook "641b1d5662d7e00001eaa46b" could not be found. log_id: 641b6c253cd9a50001514fae object: error type: resource_not_found_error schema: $ref: '#/components/schemas/error' description: not found entity '500': content: application/vnd.conekta-v2.2.0+json: example: details: - debug_message: There was a runtime error and Conekta engineers have been notified. message: There was a runtime error and Conekta engineers have been notified. code: conekta.errors.api.system.general_failure object: error type: api_error log_id: 641b6f2b3cd9a50001515098 schema: $ref: '#/components/schemas/error' description: internal server error security: - bearerAuth: [] summary: Update Product tags: - Products components: schemas: details_error: properties: code: example: conekta.errors.authentication.missing_key type: string param: type: string nullable: true message: example: Acceso no autorizado. type: string debug_message: example: Please include your access key in your request. type: string title: details_error product: properties: antifraud_info: additionalProperties: true example: key: value type: object brand: description: The brand of the item. example: Cohiba type: string description: description: Short description of the item example: Imported From Mex. maxLength: 250 type: string metadata: additionalProperties: true default: {} description: It is a key/value hash that can hold custom fields. Maximum 100 elements and allows special characters. example: key: value maxProperties: 100 type: object name: description: The name of the item. It will be displayed in the order. example: Box of Cohiba S1s type: string quantity: description: The quantity of the item in the order. example: 1 format: int32 minimum: 1 type: integer sku: description: The stock keeping unit for the item. It is used to identify the item in the order. example: XYZ12345 type: string tags: description: List of tags for the item. It is used to identify the item in the order. example: - food - mexican food items: type: string type: array unit_price: description: The price of the item in cents. example: 20000 format: int32 minimum: 0 type: integer required: - name - quantity - unit_price title: product update_product: properties: antifraud_info: additionalProperties: type: object description: maxLength: 250 type: string sku: type: string name: example: Box of Cohiba S1s type: string unit_price: example: 20000 format: int64 minimum: 0 type: integer quantity: example: 1 format: int32 minimum: 1 type: integer tags: items: type: string type: array brand: type: string metadata: additionalProperties: type: string title: update_product error: allOf: - properties: details: items: $ref: '#/components/schemas/details_error' type: array - properties: log_id: description: log id example: 507f1f77bcf86cd799439011 type: string nullable: true type: example: authentication_error type: string object: example: error type: string description: err model title: error product_order_response: allOf: - properties: antifraud_info: additionalProperties: true example: key: value type: object brand: description: The brand of the item. example: Cohiba type: string description: description: Short description of the item example: Imported From Mex. maxLength: 250 type: string metadata: additionalProperties: true default: {} description: It is a key/value hash that can hold custom fields. Maximum 100 elements and allows special characters. example: key: value maxProperties: 100 type: object name: description: The name of the item. It will be displayed in the order. example: Box of Cohiba S1s type: string quantity: description: The quantity of the item in the order. example: 1 format: int32 minimum: 1 type: integer sku: description: The stock keeping unit for the item. It is used to identify the item in the order. example: XYZ12345 type: string tags: description: List of tags for the item. It is used to identify the item in the order. example: - food - mexican food items: type: string type: array unit_price: description: The price of the item in cents. example: 20000 format: int32 minimum: 0 type: integer required: - name - quantity - unit_price title: product - properties: id: type: string object: type: string parent_id: type: string title: product order response securitySchemes: bearerAuth: scheme: bearer type: http