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.
key_idstringSealed envelope (RSA-OAEP-256+A256GCM): the key_id of the DayZero public key from GET /credit/me (shopify_transport). With it, encrypted_token is AES-256-GCM under a random 32-byte content key that wrapped_key carries, salt only salts token_hash, and no shared secret is used. A key DayZero does not hold is 400 CREDIT_905. Omit for the shared-secret envelope.
wrapped_keystringBase64 RSA-OAEP (SHA-256, MGF1-SHA-256) encryption of the content key under the key_id public key. Required with key_id.
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.