{"openapi":"3.1.0","info":{"title":"Data Ingestion API","description":"Customer-facing REST API for pushing order, refund, gift card, and payment data to Blue Onion. Orders carry typed line items (product and shipping); gift cards and payments are sibling resources.","version":"0.2.0"},"paths":{"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/transactions/orders":{"get":{"tags":["Orders"],"summary":"List Orders","operationId":"list_orders_v1_transactions_orders_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Page Size"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created After"}},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Before"}},{"name":"updated_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated After"}},{"name":"updated_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated Before"}},{"name":"include_deleted","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Deleted"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPaginatedResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Orders"],"summary":"Create Order","operationId":"create_order_v1_transactions_orders_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unprocessable Entity"}}}},"/v1/transactions/orders/{transaction_id}":{"get":{"tags":["Orders"],"summary":"Get Order","operationId":"get_order_v1_transactions_orders__transaction_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"transaction_id","in":"path","required":true,"schema":{"type":"string","title":"Transaction Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Orders"],"summary":"Upsert Order","operationId":"upsert_order_v1_transactions_orders__transaction_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"transaction_id","in":"path","required":true,"schema":{"type":"string","title":"Transaction Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unprocessable Entity"}}},"delete":{"tags":["Orders"],"summary":"Delete Order","operationId":"delete_order_v1_transactions_orders__transaction_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"transaction_id","in":"path","required":true,"schema":{"type":"string","title":"Transaction Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/transactions/orders/bulk":{"put":{"tags":["Orders"],"summary":"Bulk Upsert Orders","operationId":"bulk_upsert_orders_v1_transactions_orders_bulk_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkOrderRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkTransactionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Orders"],"summary":"Bulk Create Orders","operationId":"bulk_create_orders_v1_transactions_orders_bulk_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkOrderRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkTransactionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Orders"],"summary":"Bulk Delete Orders","operationId":"bulk_delete_orders_v1_transactions_orders_bulk_delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/transactions/refunds":{"get":{"tags":["Refunds"],"summary":"List Refunds","operationId":"list_refunds_v1_transactions_refunds_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Page Size"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created After"}},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Before"}},{"name":"updated_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated After"}},{"name":"updated_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated Before"}},{"name":"include_deleted","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Deleted"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPaginatedResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Refunds"],"summary":"Create Refund","operationId":"create_refund_v1_transactions_refunds_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unprocessable Entity"}}}},"/v1/transactions/refunds/{transaction_id}":{"get":{"tags":["Refunds"],"summary":"Get Refund","operationId":"get_refund_v1_transactions_refunds__transaction_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"transaction_id","in":"path","required":true,"schema":{"type":"string","title":"Transaction Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Refunds"],"summary":"Upsert Refund","operationId":"upsert_refund_v1_transactions_refunds__transaction_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"transaction_id","in":"path","required":true,"schema":{"type":"string","title":"Transaction Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unprocessable Entity"}}},"delete":{"tags":["Refunds"],"summary":"Delete Refund","operationId":"delete_refund_v1_transactions_refunds__transaction_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"transaction_id","in":"path","required":true,"schema":{"type":"string","title":"Transaction Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/transactions/refunds/bulk":{"put":{"tags":["Refunds"],"summary":"Bulk Upsert Refunds","operationId":"bulk_upsert_refunds_v1_transactions_refunds_bulk_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkRefundRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkTransactionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Refunds"],"summary":"Bulk Create Refunds","operationId":"bulk_create_refunds_v1_transactions_refunds_bulk_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkRefundRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkTransactionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Refunds"],"summary":"Bulk Delete Refunds","operationId":"bulk_delete_refunds_v1_transactions_refunds_bulk_delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/transactions/gift_cards":{"get":{"tags":["Gift Cards"],"summary":"List Gift Cards","operationId":"list_gift_cards_v1_transactions_gift_cards_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Page Size"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"include_deleted","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Deleted"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPaginatedResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Gift Cards"],"summary":"Create Gift Card","operationId":"create_gift_card_v1_transactions_gift_cards_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCardRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unprocessable Entity"}}}},"/v1/transactions/gift_cards/{gift_card_id}":{"get":{"tags":["Gift Cards"],"summary":"Get Gift Card","operationId":"get_gift_card_v1_transactions_gift_cards__gift_card_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"gift_card_id","in":"path","required":true,"schema":{"type":"string","title":"Gift Card Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Gift Cards"],"summary":"Upsert Gift Card","operationId":"upsert_gift_card_v1_transactions_gift_cards__gift_card_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"gift_card_id","in":"path","required":true,"schema":{"type":"string","title":"Gift Card Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCardRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unprocessable Entity"}}},"delete":{"tags":["Gift Cards"],"summary":"Delete Gift Card","operationId":"delete_gift_card_v1_transactions_gift_cards__gift_card_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"gift_card_id","in":"path","required":true,"schema":{"type":"string","title":"Gift Card Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/transactions/gift_cards/bulk":{"put":{"tags":["Gift Cards"],"summary":"Bulk Upsert Gift Cards","operationId":"bulk_upsert_gift_cards_v1_transactions_gift_cards_bulk_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkGiftCardRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkTransactionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Gift Cards"],"summary":"Bulk Create Gift Cards","operationId":"bulk_create_gift_cards_v1_transactions_gift_cards_bulk_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkGiftCardRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkTransactionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Gift Cards"],"summary":"Bulk Delete Gift Cards","operationId":"bulk_delete_gift_cards_v1_transactions_gift_cards_bulk_delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/transactions/payments":{"get":{"tags":["Payments"],"summary":"List Payments","operationId":"list_payments_v1_transactions_payments_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Page Size"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"include_deleted","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Deleted"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPaginatedResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Payments"],"summary":"Create Payment","operationId":"create_payment_v1_transactions_payments_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unprocessable Entity"}}}},"/v1/transactions/payments/{payment_id}":{"get":{"tags":["Payments"],"summary":"Get Payment","operationId":"get_payment_v1_transactions_payments__payment_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Payments"],"summary":"Upsert Payment","operationId":"upsert_payment_v1_transactions_payments__payment_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unprocessable Entity"}}},"delete":{"tags":["Payments"],"summary":"Delete Payment","operationId":"delete_payment_v1_transactions_payments__payment_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/transactions/payments/bulk":{"put":{"tags":["Payments"],"summary":"Bulk Upsert Payments","operationId":"bulk_upsert_payments_v1_transactions_payments_bulk_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkPaymentRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkTransactionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Payments"],"summary":"Bulk Create Payments","operationId":"bulk_create_payments_v1_transactions_payments_bulk_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkPaymentRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkTransactionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Payments"],"summary":"Bulk Delete Payments","operationId":"bulk_delete_payments_v1_transactions_payments_bulk_delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}}},"components":{"schemas":{"BulkDeleteRequest":{"properties":{"transaction_ids":{"items":{"type":"string"},"type":"array","maxItems":100,"minItems":1,"title":"Transaction Ids"}},"type":"object","required":["transaction_ids"],"title":"BulkDeleteRequest"},"BulkDeleteResponse":{"properties":{"deleted":{"items":{"type":"string"},"type":"array","title":"Deleted"},"not_found":{"items":{"type":"string"},"type":"array","title":"Not Found"},"total":{"type":"integer","title":"Total"},"deleted_count":{"type":"integer","title":"Deleted Count"},"not_found_count":{"type":"integer","title":"Not Found Count"}},"type":"object","required":["deleted","not_found","total","deleted_count","not_found_count"],"title":"BulkDeleteResponse"},"BulkGiftCardRequest":{"properties":{"gift_cards":{"items":{"$ref":"#/components/schemas/GiftCardRequest"},"type":"array","maxItems":100,"minItems":1,"title":"Gift Cards"}},"type":"object","required":["gift_cards"],"title":"BulkGiftCardRequest"},"BulkOrderRequest":{"properties":{"transactions":{"items":{"$ref":"#/components/schemas/OrderRequest"},"type":"array","maxItems":100,"minItems":1,"title":"Transactions"}},"type":"object","required":["transactions"],"title":"BulkOrderRequest"},"BulkPaymentRequest":{"properties":{"payments":{"items":{"$ref":"#/components/schemas/PaymentRequest"},"type":"array","maxItems":100,"minItems":1,"title":"Payments"}},"type":"object","required":["payments"],"title":"BulkPaymentRequest"},"BulkRefundRequest":{"properties":{"transactions":{"items":{"$ref":"#/components/schemas/RefundRequest"},"type":"array","maxItems":100,"minItems":1,"title":"Transactions"}},"type":"object","required":["transactions"],"title":"BulkRefundRequest"},"BulkTransactionResponse":{"properties":{"successful":{"items":{"$ref":"#/components/schemas/TransactionResponse"},"type":"array","title":"Successful"},"failed":{"items":{"$ref":"#/components/schemas/FailedTransactionResponse"},"type":"array","title":"Failed"},"total":{"type":"integer","title":"Total"},"success_count":{"type":"integer","title":"Success Count"},"failure_count":{"type":"integer","title":"Failure Count"}},"type":"object","required":["successful","failed","total","success_count","failure_count"],"title":"BulkTransactionResponse"},"CursorPaginatedResponse":{"properties":{"data":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Data"},"page_size":{"type":"integer","title":"Page Size"},"has_more":{"type":"boolean","title":"Has More"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["data","page_size","has_more"],"title":"CursorPaginatedResponse"},"ErrorResponse":{"properties":{"error":{"type":"string","title":"Error"},"message":{"type":"string","title":"Message"},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Details"}},"type":"object","required":["error","message"],"title":"ErrorResponse"},"FailedTransactionResponse":{"properties":{"transaction_id":{"type":"string","title":"Transaction Id"},"error":{"type":"string","title":"Error"}},"type":"object","required":["transaction_id","error"],"title":"FailedTransactionResponse"},"GiftCardRequest":{"properties":{"gift_card_id":{"type":"string","maxLength":255,"minLength":1,"title":"Gift Card Id","description":"External gift card id (Shopify GiftCard.id)."},"issued_at":{"type":"string","format":"date-time","title":"Issued At","description":"When the card was issued (GiftCard.createdAt)."},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","description":"ISO 4217 currency code; auto-uppercased."},"initial_value":{"type":"number","minimum":0.0,"title":"Initial Value","description":"Value the card was issued with."},"balance":{"type":"number","minimum":0.0,"title":"Balance","description":"Current remaining balance."},"last_characters":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Characters","description":"Last characters of the card code (GiftCard.lastCharacters)."},"source_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Name","description":"Provider/system that generated the card (e.g. 'Loop', 'Narvar', 'Complimentary'). Defaults to 'data_ingestion_api'.","default":"data_ingestion_api"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Free-text note on the card."},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"Expiry timestamp, if any."},"disabled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Disabled At","description":"When the card was disabled, if any."},"customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Id","description":"External customer id the card belongs to."},"order_reference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order Reference Id","description":"Issuing order id (GiftCard.order)."},"edit_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Edit Version","description":"Issuing order edit version."}},"type":"object","required":["gift_card_id","issued_at","currency","initial_value","balance"],"title":"GiftCardRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LineItem":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"sku":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sku"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Id"},"variant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Variant Id"},"line_item_type":{"$ref":"#/components/schemas/LineItemType","description":"Discriminator: 'product' (default) or 'shipping'. Shipping rows model Shopify ShippingLine.","default":"product"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Shipping line title/category (e.g. 'Standard Shipping')."},"carrier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier","description":"Carrier identifier for shipping lines (Shopify carrierIdentifier)."},"quantity":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Quantity","description":"Required for product lines; defaults to 1 for shipping lines."},"unit_price":{"type":"number","title":"Unit Price"},"discount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Discount"},"tax":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Tax"},"cost_of_goods":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Cost Of Goods"},"total":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total"}},"type":"object","required":["unit_price"],"title":"LineItem"},"LineItemType":{"type":"string","enum":["product","shipping"],"title":"LineItemType"},"OrderRequest":{"properties":{"transaction_id":{"type":"string","maxLength":255,"minLength":1,"title":"Transaction Id"},"transaction_date":{"type":"string","format":"date-time","title":"Transaction Date"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency"},"gross_price":{"type":"number","minimum":0.0,"title":"Gross Price"},"discounts":{"type":"number","minimum":0.0,"title":"Discounts"},"shipping":{"type":"number","minimum":0.0,"title":"Shipping"},"tax":{"type":"number","minimum":0.0,"title":"Tax"},"total_price":{"type":"number","minimum":0.0,"title":"Total Price"},"cancelled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cancelled At"},"additional_fees":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Additional Fees"},"duties":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Duties"},"tip":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Tip"},"gift_card_gross_sales":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Gift Card Gross Sales"},"gift_card_net_sales":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Gift Card Net Sales"},"payment_gateway":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Gateway"},"payment_processor_fees":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Payment Processor Fees"},"net_settlement":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Net Settlement"},"settlement_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Settlement Date"},"payout_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payout Id"},"payment_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Method"},"financial_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Financial Status"},"fulfillment_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fulfillment Status"},"fulfilled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Fulfilled At"},"channel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"country_code":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"Country Code"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code"},"customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Id"},"discount_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discount Code"},"edit_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Edit Version"},"external_checkout_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Checkout Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"taxes_included":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Taxes Included","default":false},"line_items":{"anyOf":[{"items":{"$ref":"#/components/schemas/LineItem"},"type":"array"},{"type":"null"}],"title":"Line Items"}},"type":"object","required":["transaction_id","transaction_date","currency","gross_price","discounts","shipping","tax","total_price"],"title":"OrderRequest"},"PaymentRequest":{"properties":{"payment_id":{"type":"string","maxLength":255,"minLength":1,"title":"Payment Id","description":"External payment id (OrderTransaction.id)."},"order_reference_id":{"type":"string","maxLength":255,"minLength":1,"title":"Order Reference Id","description":"Order this payment applies to; must reference an existing order."},"processed_at":{"type":"string","format":"date-time","title":"Processed At","description":"When the payment was processed (OrderTransaction.processedAt)."},"payment_type":{"type":"string","minLength":1,"title":"Payment Type","description":"Transaction kind: sale | refund | capture | authorization | void | return."},"gateway":{"type":"string","minLength":1,"title":"Gateway","description":"Payment gateway: stripe | gift_card | manual | cash | ..."},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","description":"ISO 4217 currency code; auto-uppercased."},"amount":{"type":"number","title":"Amount","description":"Signed amount; negative for refund/return."},"purchase_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Purchase Amount","description":"Presentment (purchase) amount."},"purchase_currency":{"anyOf":[{"type":"string","maxLength":3,"minLength":3},{"type":"null"}],"title":"Purchase Currency","description":"Presentment ISO 4217 currency; auto-uppercased."},"status":{"type":"string","title":"Status","description":"Transaction status (OrderTransaction.status).","default":"success"},"fees":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Fees","description":"Processor fees on the payment.","default":0},"net_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Net Amount","description":"Net amount after fees."},"payout_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payout Id","description":"Settlement/payout id."},"bin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bin","description":"Card BIN (OrderTransaction.paymentDetails.bin)."},"parent_payment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Payment Id","description":"Parent payment id for captures/refunds (OrderTransaction.parentTransaction)."},"edit_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Edit Version","description":"Order edit version."},"authorized_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Authorized At","description":"Authorization timestamp."},"available_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Available At","description":"Funds-available timestamp."},"paid_out_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid Out At","description":"Payout timestamp."}},"type":"object","required":["payment_id","order_reference_id","processed_at","payment_type","gateway","currency","amount"],"title":"PaymentRequest"},"RefundRequest":{"properties":{"transaction_id":{"type":"string","maxLength":255,"minLength":1,"title":"Transaction Id"},"transaction_date":{"type":"string","format":"date-time","title":"Transaction Date"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency"},"gross_price":{"type":"number","minimum":0.0,"title":"Gross Price"},"discounts":{"type":"number","minimum":0.0,"title":"Discounts"},"shipping":{"type":"number","minimum":0.0,"title":"Shipping"},"tax":{"type":"number","minimum":0.0,"title":"Tax"},"total_price":{"type":"number","minimum":0.0,"title":"Total Price"},"cancelled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cancelled At"},"additional_fees":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Additional Fees"},"duties":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Duties"},"tip":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Tip"},"gift_card_gross_sales":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Gift Card Gross Sales"},"gift_card_net_sales":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Gift Card Net Sales"},"payment_gateway":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Gateway"},"payment_processor_fees":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Payment Processor Fees"},"net_settlement":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Net Settlement"},"settlement_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Settlement Date"},"payout_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payout Id"},"payment_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Method"},"financial_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Financial Status"},"fulfillment_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fulfillment Status"},"fulfilled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Fulfilled At"},"channel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"country_code":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"Country Code"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code"},"customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Id"},"discount_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discount Code"},"edit_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Edit Version"},"external_checkout_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Checkout Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"taxes_included":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Taxes Included","default":false},"line_items":{"anyOf":[{"items":{"$ref":"#/components/schemas/LineItem"},"type":"array"},{"type":"null"}],"title":"Line Items"},"transaction_reference_id":{"type":"string","maxLength":255,"minLength":1,"title":"Transaction Reference Id"},"refund_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refund Reason"},"is_exchange":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Exchange","default":false}},"type":"object","required":["transaction_id","transaction_date","currency","gross_price","discounts","shipping","tax","total_price","transaction_reference_id"],"title":"RefundRequest"},"TransactionResponse":{"properties":{"transaction_id":{"type":"string","title":"Transaction Id"},"action":{"type":"string","title":"Action"},"message":{"type":"string","title":"Message"}},"type":"object","required":["transaction_id","action","message"],"title":"TransactionResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}