201Successful Response
Schema: SuccessEnvelope_ShopifyPullResponse_
successbooleanmessagestringcodestringdataShopifyPullResponse
/api/v1/credit/shopify-pullFor partners that hold the merchant's Shopify Admin API token in their own vault and pass it encrypted (PBKDF2-HMAC-SHA256 with a per-request random salt + AES-256-GCM bound to shop_domain + salted SHA-256 token_hash). DayZero decrypts the token only in memory, queries Shopify for orders, daily sales and refund summaries, disputes, and Shopify Capital balance transactions onto the merchant's DayZero business, and discards the plaintext token. Only the irreversible salted SHA-256 fingerprint (sha256:{salt}:{hash}) is stored in the database.
Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.
Schema: ShopifyPullRequest
program_idstringYour lending program id. Required without credit_line_id; with it, must match the line's program if sent.
external_merchant_idstringYour id for the merchant, as sent on POST /credit/lines and POST /credit/bank-feeds. Required without credit_line_id.
credit_line_idstringThe merchant's open credit line id, when one already exists.
merchant_legal_namestringNames the merchant's DayZero business when this call creates it. Ignored when the business already exists.
merchant_business_idstringThe merchant's existing DayZero business id, when already created by a bank feed or bank connection.
shop_domainstringrequiredThe merchant's Shopify store domain (*.myshopify.com).
encrypted_tokenstringrequiredBase64 AES-256-GCM ciphertext of the Shopify Admin API access token, encrypted with the per-request salt and iv and bound to the normalized shop_domain as additional authenticated data.
saltstringrequiredPer-request random hex salt (16–32 bytes) used for PBKDF2-HMAC-SHA256 key derivation and the salted token_hash.
ivstringrequiredHex initialization vector (12–16 bytes) for AES-256-GCM.
auth_tagstringrequired16-byte hex authentication tag produced by AES-256-GCM.
token_hashstringrequiredSalted SHA-256 hex digest of {salt}:{shop_domain}:{access_token} verifying token integrity after transport decryption.
Schema: SuccessEnvelope_ShopifyPullResponse_
successbooleanmessagestringcodestringdataShopifyPullResponseSchema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.