{"openapi":"3.0.3","info":{"title":"Boma API","version":"1.0.0"},"paths":{"/boma/v1/wechat-platforms":{"get":{"operationId":"ListWechatPlatforms","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WechatPlatformDirectory"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"post":{"operationId":"CreateWechatPlatform","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWechatPlatformRequest"}}}}}},"/boma/v1/wechat-platforms/{component_appid}":{"parameters":[{"in":"path","name":"component_appid","required":true,"schema":{"type":"string"}}],"put":{"operationId":"UpdateWechatPlatform","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWechatPlatformRequest"}}}}}},"/boma/v1/agencies/{agency}/wechat-platform":{"parameters":[{"in":"path","name":"agency","required":true,"schema":{"type":"string"}}],"put":{"operationId":"AssignWechatPlatform","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignWechatPlatformRequest"}}}}},"delete":{"operationId":"UnassignWechatPlatform","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/boma/v1/merchants/{merchant}/wechat-registrations/{registration}/resolve":{"parameters":[{"in":"path","name":"merchant","required":true,"schema":{"type":"string"}},{"in":"path","name":"registration","required":true,"schema":{"type":"string"}}],"post":{"operationId":"ResolveWechatRegistration","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WechatRegistrationAction"}}}},"default":{"description":"Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveWechatRegistrationRequest"}}}}}},"/boma/v1/merchants/{merchant}/mini-programs":{"parameters":[{"in":"path","name":"merchant","required":true,"schema":{"type":"string"}}],"get":{"operationId":"ListMerchantMiniPrograms","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantMiniPrograms"}}}},"default":{"description":"Error"}}}},"/boma/v1/merchants/{merchant}/mini-programs/{appid}/credentials":{"parameters":[{"in":"path","name":"merchant","required":true,"schema":{"type":"string"}},{"in":"path","name":"appid","required":true,"schema":{"type":"string"}}],"put":{"operationId":"UpdateMiniProgramCredentials","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"]}}}},"default":{"description":"Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMiniProgramCredentialsRequest"}}}}}},"/boma/v1/merchants/{merchant}/wechat-registrations":{"parameters":[{"in":"path","name":"merchant","required":true,"schema":{"type":"string"}}],"post":{"operationId":"CreateWechatRegistration","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WechatRegistrationAction"}}}},"default":{"description":"Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WechatRegistrationRequest"}}}}}},"/boma/v1/merchants/{merchant}/wechat-registrations/{registration}/continue":{"parameters":[{"in":"path","name":"merchant","required":true,"schema":{"type":"string"}},{"in":"path","name":"registration","required":true,"schema":{"type":"string"}}],"post":{"operationId":"ContinueWechatRegistration","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WechatRegistrationAction"}}}},"default":{"description":"Error"}}}},"/boma/v1/merchants/{merchant}/wechat-registrations/{registration}/cancel":{"parameters":[{"in":"path","name":"merchant","required":true,"schema":{"type":"string"}},{"in":"path","name":"registration","required":true,"schema":{"type":"string"}}],"post":{"operationId":"CancelWechatRegistration","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"]}}}},"default":{"description":"Error"}}}},"/boma/v1/shops/{shop}/apps":{"parameters":[{"in":"path","name":"shop","required":true,"schema":{"type":"string"}}],"get":{"operationId":"ListShopApps","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopAppList"}}}},"default":{"description":"Error"}}}},"/boma/v1/shops/{shop}/apps/miniprograms/bind":{"parameters":[{"in":"path","name":"shop","required":true,"schema":{"type":"string"}}],"post":{"operationId":"BindShopMiniProgram","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopAppBinding"}}}},"default":{"description":"Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BindMiniProgramRequest"}}}}}},"/boma/v1/shops/{shop}/apps/miniprograms/import":{"parameters":[{"in":"path","name":"shop","required":true,"schema":{"type":"string"}}],"post":{"operationId":"ImportShopMiniProgram","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopAppBinding"}}}},"default":{"description":"Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportMiniProgramRequest"}}}}}},"/boma/v1/shops/{shop}/apps/{app}":{"parameters":[{"in":"path","name":"shop","required":true,"schema":{"type":"string"}},{"in":"path","name":"app","required":true,"schema":{"type":"string"}}],"delete":{"operationId":"UnbindShopApp","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"]}}}},"default":{"description":"Error"}}}},"/boma/v1/auth/login":{"post":{"operationId":"Login","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}}},"description":"Returns status=authenticated with session tokens, user and identities, or status=mfa_enrollment_required/mfa_verification_required with challenge_token and expires_at (5 minutes). Challenge tokens cannot select identities, change passwords, or access business APIs.","security":[]}},"/boma/v1/auth/refresh":{"post":{"operationId":"Refresh","description":"Send the refresh_token as Authorization: Bearer <refresh_token>. Rotates both tokens for the same session and identity. The refresh deadline stays 72 hours after the original login.","responses":{"200":{"description":"Rotated session tokens","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionTokens"}}}},"401":{"description":"Refresh token invalid, expired, or revoked"}},"security":[{"BearerSession":[]}]}},"/boma/v1/auth/logout":{"post":{"operationId":"Logout","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"security":[{"BearerSession":[]}]}},"/boma/v1/auth/me":{"get":{"operationId":"Me","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/boma/v1/agencies":{"post":{"operationId":"CreateAgency","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationRequest"}}}}},"get":{"operationId":"ListAgencies","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/boma/v1/agencies/{agency}/name":{"parameters":[{"name":"agency","in":"path","required":true,"schema":{"type":"string"}}],"put":{"operationId":"RenameAgency","description":"Updates the agency display name. Requires a platform identity with agency:update on this agency.","responses":{"200":{"description":"Updated agency","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NameRequest"}}}}}},"/boma/v1/agencies/{agency}/merchants":{"parameters":[{"name":"agency","in":"path","required":true,"schema":{"type":"string"}}],"post":{"operationId":"CreateMerchant","description":"Omit all login fields to reserve the merchant's super administrator identity for later binding.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationRequest"}}}}},"get":{"operationId":"ListMerchants","description":"Each merchant includes super_admin_bound, indicating whether its super administrator identity has a user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/boma/v1/merchants/{merchant}/name":{"parameters":[{"name":"merchant","in":"path","required":true,"schema":{"type":"string"}}],"put":{"operationId":"RenameMerchant","description":"Updates the merchant display name. Requires an identity from the owning agency with merchant:update on this merchant.","responses":{"200":{"description":"Updated merchant","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NameRequest"}}}}}},"/boma/v1/merchants/{merchant}/super-admin":{"parameters":[{"name":"merchant","in":"path","required":true,"schema":{"type":"string"}}],"get":{"operationId":"GetMerchantAdminBinding","description":"Read the current super administrator binding with merchant:bind-super-admin from the platform or owning agency.","responses":{"200":{"description":"Current binding","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantAdminBinding"}}}}}},"put":{"operationId":"SetMerchantAdminBinding","description":"Bind or replace the merchant's super administrator login with merchant:bind-super-admin from the platform or owning agency. Replacing the user revokes this identity's sessions and API keys. Repeating the current assignment preserves its credentials, including the password.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantAdminBindingRequest"}}}},"responses":{"200":{"description":"Saved binding","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantAdminBinding"}}}},"409":{"description":"The expected binding has changed or the new username is in use."}}},"delete":{"operationId":"ClearMerchantAdminBinding","description":"Unbind the login using merchant:bind-super-admin from the platform or owning agency. This preserves the merchant administrator identity and revokes its sessions and API keys. Repeating an unbind on an unbound merchant succeeds.","parameters":[{"name":"expected_user_id","in":"query","schema":{"type":"string"},"description":"If supplied, a different current owner causes a conflict. Send the previously observed user ID to protect a replacement binding on retry."}],"responses":{"200":{"description":"Unbound administrator with null user_id and username","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantAdminBinding"}}}},"409":{"description":"A different user now holds the binding."}}}},"/boma/v1/merchants/{merchant}/shops":{"parameters":[{"name":"merchant","in":"path","required":true,"schema":{"type":"string"}}],"post":{"operationId":"CreateShop","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateShopRequest"}}}}},"get":{"operationId":"ListShops","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/boma/v1/shops/{shop}":{"parameters":[{"name":"shop","in":"path","required":true,"schema":{"type":"string"}}],"put":{"operationId":"UpdateShop","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateShopRequest"}}}}}},"/boma/v1/shops/{shop}/name":{"parameters":[{"name":"shop","in":"path","required":true,"schema":{"type":"string"}}],"put":{"operationId":"RenameShop","description":"Updates the shop display name. Requires an identity from the owning merchant with shop:update on this shop.","responses":{"200":{"description":"Updated shop","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NameRequest"}}}}}},"/boma/v1/shops/{shop}/customers":{"parameters":[{"name":"shop","in":"path","required":true,"schema":{"type":"string"}}],"post":{"operationId":"CreateCustomer","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NameRequest"}}}}},"get":{"operationId":"ListCustomers","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/boma/v1/agencies/{agency}/sales-reps":{"parameters":[{"name":"agency","in":"path","required":true,"schema":{"type":"string"}}],"post":{"operationId":"CreateSalesRep","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NameRequest"}}}}},"get":{"operationId":"ListSalesReps","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/boma/v1/agencies/{agency}/settings":{"parameters":[{"name":"agency","in":"path","required":true,"schema":{"type":"string"}}],"get":{"operationId":"ListAgencySettings","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/boma/v1/agencies/{agency}/settings/{key}":{"parameters":[{"name":"agency","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"put":{"operationId":"SetAgencySetting","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingRequest"}}}}}},"/boma/v1/agencies/{agency}/avatar":{"parameters":[{"name":"agency","in":"path","required":true,"schema":{"type":"string"}}],"put":{"operationId":"SetAgencyAvatar","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvatarRequest"}}}}}},"/boma/v1/shops/{shop}/settings":{"parameters":[{"name":"shop","in":"path","required":true,"schema":{"type":"string"}}],"get":{"operationId":"ListShopSettings","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/boma/v1/shops/{shop}/settings/{key}":{"parameters":[{"name":"shop","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"put":{"operationId":"SetShopSetting","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingRequest"}}}}}},"/boma/v1/shops/{shop}/avatar":{"parameters":[{"name":"shop","in":"path","required":true,"schema":{"type":"string"}}],"put":{"operationId":"SetShopAvatar","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvatarRequest"}}}}}},"/boma/v1/employees":{"get":{"operationId":"ListEmployees","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"post":{"operationId":"CreateEmployee","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeRequest"}}}}}},"/boma/v1/employees/{employee}/password":{"parameters":[{"name":"employee","in":"path","required":true,"schema":{"type":"string"}}],"put":{"operationId":"ResetPassword","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordRequest"}}}}}},"/boma/v1/policies":{"post":{"operationId":"CreatePolicy","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyRequest"}}}}},"get":{"operationId":"ListPolicies","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/boma/v1/policies/{policy}":{"parameters":[{"name":"policy","in":"path","required":true,"schema":{"type":"string"}}],"put":{"operationId":"UpdatePolicy","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyRequest"}}}}}},"/boma/v1/employees/{employee}/policies/{policy}":{"parameters":[{"name":"employee","in":"path","required":true,"schema":{"type":"string"}},{"name":"policy","in":"path","required":true,"schema":{"type":"string"}}],"put":{"operationId":"AttachPolicy","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"delete":{"operationId":"DetachPolicy","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/boma/v1/payment-systems":{"get":{"operationId":"ListPaymentSystems","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/boma/v1/agencies/{agency}/payment-connections":{"parameters":[{"name":"agency","in":"path","required":true,"schema":{"type":"string"}}],"get":{"operationId":"ListAgencyConnections","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"post":{"operationId":"CreateAgencyConnection","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgencyConnectionRequest"}}}}}},"/boma/v1/agency-payment-connections/{connection}":{"parameters":[{"name":"connection","in":"path","required":true,"schema":{"type":"string"}}],"put":{"operationId":"UpdateAgencyConnection","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateConnectionRequest"}}}}}},"/boma/v1/agency-payment-connections/{connection}/credentials":{"parameters":[{"name":"connection","in":"path","required":true,"schema":{"type":"string"}}],"get":{"operationId":"GetAgencyCredentials","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/boma/v1/merchants/{merchant}/payment-connections":{"parameters":[{"name":"merchant","in":"path","required":true,"schema":{"type":"string"}}],"get":{"operationId":"ListMerchantConnections","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"description":"List the merchant's payment connections."},"post":{"operationId":"CreateMerchantConnection","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantConnectionRequest"}}}},"description":"Create a payment connection that shops belonging to this merchant can use."}},"/boma/v1/merchant-payment-connections/{connection}":{"parameters":[{"name":"connection","in":"path","required":true,"schema":{"type":"string"}}],"put":{"operationId":"UpdateMerchantConnection","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateConnectionRequest"}}}},"description":"Update a merchant payment connection and create a new configuration version."}},"/boma/v1/merchant-payment-connections/{connection}/credentials":{"parameters":[{"name":"connection","in":"path","required":true,"schema":{"type":"string"}}],"get":{"operationId":"GetMerchantCredentials","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"description":"Read the current credentials for a merchant payment connection."}},"/boma/v1/agencies/{agency}/payment-webhook":{"parameters":[{"name":"agency","in":"path","required":true,"schema":{"type":"string"}}],"put":{"operationId":"SetAgencyWebhook","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgencyWebhookConfig"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRequest"}}}},"description":"Set the callback URL for payment and refund postings in this agency. An empty URL disables new deliveries."},"get":{"operationId":"GetAgencyWebhook","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgencyWebhookConfig"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"description":"Read the agency callback URL and its Ed25519 verification keys."}},"/boma/v1/agencies/{agency}/payment-webhook/rotate-key":{"parameters":[{"name":"agency","in":"path","required":true,"schema":{"type":"string"}}],"post":{"operationId":"RotateAgencyWebhookKey","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgencyWebhookConfig"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/boma/v1/agencies/{agency}/deliveries":{"parameters":[{"name":"agency","in":"path","required":true,"schema":{"type":"string"}}],"get":{"operationId":"ListAgencyDeliveries","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/boma/v1/merchants/{merchant}/payment-webhook":{"parameters":[{"name":"merchant","in":"path","required":true,"schema":{"type":"string"}}],"get":{"operationId":"GetMerchantWebhook","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSigningKeys"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"description":"Read the verification keys for this merchant’s shop callbacks."}},"/boma/v1/merchants/{merchant}/payment-webhook/rotate-key":{"parameters":[{"name":"merchant","in":"path","required":true,"schema":{"type":"string"}}],"post":{"operationId":"RotateWebhookKey","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantWebhookKeyRotation"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/boma/v1/merchants/{merchant}/deliveries":{"parameters":[{"name":"merchant","in":"path","required":true,"schema":{"type":"string"}}],"get":{"operationId":"ListMerchantDeliveries","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/boma/v1/shops/{shop}/deliveries":{"parameters":[{"name":"shop","in":"path","required":true,"schema":{"type":"string"}}],"get":{"operationId":"ListShopDeliveries","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/boma/v1/deliveries/{delivery}/retry":{"parameters":[{"name":"delivery","in":"path","required":true,"schema":{"type":"string"}}],"post":{"operationId":"RetryDelivery","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/boma/v1/shops/{shop}/payments/supported_methods":{"parameters":[{"name":"shop","in":"path","required":true,"schema":{"type":"string"}}],"get":{"operationId":"GetSupportedPaymentMethods","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportedPaymentMethods"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"description":"Payment methods supported by at least one enabled payment connection selected for this shop."}},"/boma/v1/shops/{shop}/payments/wechat_jsapi":{"parameters":[{"name":"shop","in":"path","required":true,"schema":{"type":"string"}}],"post":{"operationId":"CreateWechatJSAPIPayment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MethodPaymentResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WechatJSAPIRequest"}}}},"description":"Idempotently submit this method. Read payment.provider_response for native invocation data. If still submitting, GET the same payment by ID."}},"/boma/v1/shops/{shop}/payments/alipay_jsapi":{"parameters":[{"name":"shop","in":"path","required":true,"schema":{"type":"string"}}],"post":{"operationId":"CreateAlipayJSAPIPayment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MethodPaymentResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlipayJSAPIRequest"}}}},"description":"Idempotently submit this method. Read payment.provider_response for native invocation data. If still submitting, GET the same payment by ID."}},"/boma/v1/shops/{shop}/payments/wechat_barcode":{"parameters":[{"name":"shop","in":"path","required":true,"schema":{"type":"string"}}],"post":{"operationId":"CreateWechatBarcodePayment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MethodPaymentResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WechatBarcodeRequest"}}}},"description":"Idempotently submit this method. Read payment.provider_response for native invocation data. If still submitting, GET the same payment by ID."}},"/boma/v1/shops/{shop}/payments/alipay_barcode":{"parameters":[{"name":"shop","in":"path","required":true,"schema":{"type":"string"}}],"post":{"operationId":"CreateAlipayBarcodePayment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MethodPaymentResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlipayBarcodeRequest"}}}},"description":"Idempotently submit this method. Read payment.provider_response for native invocation data. If still submitting, GET the same payment by ID."}},"/boma/v1/shops/{shop}/payments/external_unipay":{"parameters":[{"name":"shop","in":"path","required":true,"schema":{"type":"string"}}],"post":{"operationId":"CreateExternalUnipayPayment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MethodPaymentResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalUnipayRequest"}}}},"description":"Returns the original provider cashier URL in payment.provider_response.external_unipay.url when ready. Send this HTTPS URL to the payer or encode it directly in a QR code. The Wangpu provider returns its payUrl verbatim."}},"/boma/v1/shops/{shop}/payments":{"parameters":[{"name":"shop","in":"path","required":true,"schema":{"type":"string"}}],"get":{"operationId":"ListPayments","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/boma/v1/payments/{payment}":{"parameters":[{"name":"payment","in":"path","required":true,"schema":{"type":"string"}}],"get":{"operationId":"GetPayment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRecord"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/boma/v1/shops/{shop}/products":{"parameters":[{"name":"shop","in":"path","required":true,"schema":{"type":"string"}}],"post":{"operationId":"CreateProduct","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductRequest"}}}}},"get":{"operationId":"ListProducts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/boma/v1/products/{product}":{"parameters":[{"name":"product","in":"path","required":true,"schema":{"type":"string"}}],"put":{"operationId":"UpdateProduct","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductRequest"}}}}}},"/boma/v1/products/{product}/inventory":{"parameters":[{"name":"product","in":"path","required":true,"schema":{"type":"string"}}],"post":{"operationId":"AdjustInventory","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryRequest"}}}}},"get":{"operationId":"GetInventory","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/boma/v1/shops/{shop}/orders":{"parameters":[{"name":"shop","in":"path","required":true,"schema":{"type":"string"}}],"post":{"operationId":"CreateOrder","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderRequest"}}}}},"get":{"operationId":"ListOrders","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/boma/v1/orders/{order}":{"parameters":[{"name":"order","in":"path","required":true,"schema":{"type":"string"}}],"get":{"operationId":"GetOrder","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/boma/v1/orders/{order}/checkout-sessions":{"parameters":[{"name":"order","in":"path","required":true,"schema":{"type":"string"}}],"post":{"operationId":"CreateCheckoutSession","summary":"Issue a link for the separately configured SPOPC WeChat JSAPI cashier","description":"Available only when SPOPC WeChat OAuth and the shop’s native WeChat JSAPI route are configured.","responses":{"200":{"description":"A limited-lived cashier link for the payer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSession"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/boma/v1/shops/{shop}/analytics":{"parameters":[{"name":"shop","in":"path","required":true,"schema":{"type":"string"}}],"get":{"operationId":"ShopAnalytics","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/boma/v1/files":{"post":{"operationId":"CreateFile","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileRequest"}}}}}},"/boma/v1/files/{file}/complete":{"parameters":[{"name":"file","in":"path","required":true,"schema":{"type":"string"}}],"post":{"operationId":"CompleteFile","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/boma/v1/files/{file}":{"parameters":[{"name":"file","in":"path","required":true,"schema":{"type":"string"}}],"get":{"operationId":"GetFile","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/boma/v1/mock-payments":{"get":{"operationId":"ListMockPayments","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}}}}},"/boma/v1/mock-payments/{payment}":{"parameters":[{"name":"payment","in":"path","required":true,"schema":{"type":"string"}}],"put":{"operationId":"CompleteMockPayment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MockPaymentRequest"}}}}},"get":{"operationId":"GetMockPayment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"parameters":[{"name":"payment","in":"path","required":true,"schema":{"type":"string"}}]}},"/boma/v1/employees/{employee}":{"parameters":[{"name":"employee","in":"path","required":true,"schema":{"type":"string"}}],"put":{"operationId":"UpdateEmployee","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeUpdateRequest"}}}}}},"/boma/v1/agencies/{agency}/employees":{"parameters":[{"name":"agency","in":"path","required":true,"schema":{"type":"string"}}],"get":{"operationId":"ListAgencyEmployees","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}}}}},"/boma/v1/merchants/{merchant}/employees":{"parameters":[{"name":"merchant","in":"path","required":true,"schema":{"type":"string"}}],"get":{"operationId":"ListMerchantEmployees","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}}}}},"/boma/v1/customers/{customer}":{"parameters":[{"name":"customer","in":"path","required":true,"schema":{"type":"string"}}],"put":{"operationId":"UpdateCustomer","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NameRequest"}}}}}},"/boma/v1/auth/identities":{"get":{"operationId":"ListIdentities","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"security":[{"BearerSession":[]}]}},"/boma/v1/auth/user":{"get":{"operationId":"CurrentUser","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"security":[{"BearerSession":[]}]}},"/boma/v1/auth/select-identity":{"post":{"operationId":"SelectIdentity","description":"Issues a separate session for the selected identity with the same access expiration as the source session. Supply the source session's refresh_token to issue a separate refresh token with the same deadline.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelectIdentityRequest"}}}},"security":[{"BearerSession":[]}]}},"/boma/v1/auth/password":{"put":{"operationId":"ChangePassword","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}}},"security":[{"BearerSession":[]}]}},"/boma/v1/payments/{payment}/query":{"post":{"operationId":"QueryPayment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"parameters":[{"name":"payment","in":"path","required":true,"schema":{"type":"string"}}]}},"/boma/v1/payments/{payment}/close":{"post":{"operationId":"ClosePayment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"parameters":[{"name":"payment","in":"path","required":true,"schema":{"type":"string"}}]}},"/boma/v1/payments/{payment}/refunds":{"post":{"operationId":"CreateRefund","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundRequest"}}}},"parameters":[{"name":"payment","in":"path","required":true,"schema":{"type":"string"}}]},"get":{"operationId":"ListRefunds","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"parameters":[{"name":"payment","in":"path","required":true,"schema":{"type":"string"}}]}},"/boma/v1/refunds/{refund}":{"get":{"operationId":"GetRefund","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"parameters":[{"name":"refund","in":"path","required":true,"schema":{"type":"string"}}]}},"/boma/v1/mock-refunds":{"get":{"operationId":"ListMockRefunds","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/boma/v1/mock-refunds/{refund}":{"put":{"operationId":"CompleteMockRefund","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MockRefundRequest"}}}},"parameters":[{"name":"refund","in":"path","required":true,"schema":{"type":"string"}}]}},"/boma/v1/agency-payment-connections/{connection}/unmatched-notifications":{"get":{"operationId":"ListUnmatchedNotifications","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"parameters":[{"name":"connection","in":"path","required":true,"schema":{"type":"string"}}]}},"/boma/v1/agency-payment-connections/{connection}/notifications":{"get":{"operationId":"ListPaymentNotifications","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"parameters":[{"name":"connection","in":"path","required":true,"schema":{"type":"string"}}]}},"/boma/v1/shops/{shop}/payment-routing":{"parameters":[{"name":"shop","in":"path","required":true,"schema":{"type":"string"}}],"get":{"operationId":"GetPaymentRouting","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRouting"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"put":{"operationId":"UpdatePaymentRouting","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRouting"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRouting"}}}}}},"/boma/v1/payments/{payment}/attempts":{"parameters":[{"name":"payment","in":"path","required":true,"schema":{"type":"string"}}],"get":{"operationId":"ListPaymentAttempts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/boma/v1/users/search":{"get":{"operationId":"SearchUsers","summary":"Find enabled users by registered username for account binding","description":"Requires the corresponding agency:create, merchant:create, employee:create, or merchant:bind-super-admin permission. Returns at most 20 users. An empty query returns an empty array.","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"},"description":"Literal, case-insensitive username substring; at most 200 bytes."},{"name":"purpose","in":"query","required":true,"schema":{"type":"string","enum":["agency","merchant","merchant-admin","employee"]}},{"name":"agency_id","in":"query","required":false,"schema":{"type":"string"},"description":"Required for merchant creation; identifies the agency whose creation permission is checked."},{"name":"merchant_id","in":"query","required":false,"schema":{"type":"string"},"description":"Required for the merchant-admin purpose. Identifies the merchant whose binding permission is checked."}],"responses":{"200":{"description":"Matching users","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserSearchResult"}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/boma/v1/auth/mfa/enroll":{"post":{"operationId":"EnrollMFA","description":"Generate a new pending secret using an enrollment challenge. Supersedes the previous QR code for this challenge.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"security":[{"BearerSession":[]}]}},"/boma/v1/auth/mfa/confirm":{"post":{"operationId":"ConfirmMFA","description":"Confirm enrollment, return one-time recovery codes and a full login session. Revokes all older sessions and challenges.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MFACodeRequest"}}}},"security":[{"BearerSession":[]}]}},"/boma/v1/auth/mfa/verify":{"post":{"operationId":"VerifyMFA","description":"Exchange a password-authenticated verification challenge and a TOTP code for a full login session.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MFACodeRequest"}}}},"security":[{"BearerSession":[]}]}},"/boma/v1/auth/mfa/recover":{"post":{"operationId":"RecoverMFA","description":"Consume a recovery code with a verification challenge. Returns an enrollment-only challenge, never a business session.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MFACodeRequest"}}}},"security":[{"BearerSession":[]}]}},"/boma/v1/auth/mfa/cancel":{"post":{"operationId":"CancelMFA","description":"Invalidate a challenge. Accepts only a challenge token.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"security":[{"BearerSession":[]}]}},"/boma/v1/auth/mfa":{"get":{"operationId":"MFAStatus","description":"Read current MFA status using a fully authenticated user session.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"security":[{"BearerSession":[]}]}},"/boma/v1/auth/mfa/replace":{"post":{"operationId":"ReplaceMFA","description":"Verify password and existing TOTP to start replacement. The existing factor stays active until the replacement is confirmed. Also supports optional merchant enrollment.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MFAReplaceRequest"}}}},"security":[{"BearerSession":[]}]}},"/boma/v1/auth/api-keys":{"get":{"operationId":"ListAPIKeys","description":"List this user's keys across employee identities. Requires a full login session.","security":[{"BearerSession":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserAPIKey"}}}}}}},"post":{"operationId":"CreateAPIKey","description":"Create a key bound to the employee identity selected in the supplied session.","security":[{"BearerSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAPIKeyRequest"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedAPIKey"}}}},"401":{"description":"An active selected-identity session is required."}}}},"/boma/v1/auth/api-keys/{key}":{"delete":{"operationId":"RevokeAPIKey","description":"Revoke one key belonging to the session user.","security":[{"BearerSession":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["ok"],"properties":{"ok":{"type":"boolean"}}}}}},"404":{"description":"No such key for this user."}}}},"/boma/v1/shops/{shop}/hcl-api-keys":{"get":{"operationId":"ListShopHCLAPIKeys","parameters":[{"name":"shop","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantAPIKeyList"}}}}}},"post":{"operationId":"CreateShopHCLAPIKey","parameters":[{"name":"shop","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantKeyName"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedTenantAPIKey"}}}}}}},"/boma/v1/shops/{shop}/hcl-api-keys/{key}":{"put":{"operationId":"RenameShopHCLAPIKey","parameters":[{"name":"shop","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantKeyName"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["ok"],"properties":{"ok":{"type":"boolean"}}}}}}}},"delete":{"operationId":"DeleteShopHCLAPIKey","parameters":[{"name":"shop","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["ok"],"properties":{"ok":{"type":"boolean"}}}}}}}}},"/boma/v1/shops/{shop}/hcl-api-keys/{key}/disable":{"post":{"operationId":"DisableShopHCLAPIKey","parameters":[{"name":"shop","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["ok"],"properties":{"ok":{"type":"boolean"}}}}}}}}}},"components":{"schemas":{"CreateWechatPlatformRequest":{"type":"object","properties":{"component_appid":{"type":"string"},"display_name":{"type":"string"},"app_secret":{"type":"string","writeOnly":true},"token":{"type":"string","writeOnly":true},"encoding_aes_key":{"type":"string","writeOnly":true}},"required":["component_appid","display_name","app_secret","token","encoding_aes_key"]},"UpdateWechatPlatformRequest":{"type":"object","properties":{"display_name":{"type":"string"},"app_secret":{"type":"string","writeOnly":true},"token":{"type":"string","writeOnly":true},"encoding_aes_key":{"type":"string","writeOnly":true}}},"AssignWechatPlatformRequest":{"type":"object","properties":{"component_appid":{"type":"string"}},"required":["component_appid"]},"WechatPlatformSummary":{"type":"object","properties":{"component_appid":{"type":"string"},"display_name":{"type":"string"},"event_url":{"type":"string"},"authorizer_event_url":{"type":"string"},"authorization_domain":{"type":"string"},"ticket_time":{"type":"integer","format":"int64"}},"required":["component_appid","display_name","event_url","authorizer_event_url","authorization_domain"]},"WechatAgencyAssignment":{"type":"object","properties":{"agency_id":{"type":"string"},"agency_name":{"type":"string"},"component_appid":{"type":"string"}},"required":["agency_id","agency_name"]},"WechatPlatformDirectory":{"type":"object","properties":{"platforms":{"type":"array","items":{"$ref":"#/components/schemas/WechatPlatformSummary"}},"agencies":{"type":"array","items":{"$ref":"#/components/schemas/WechatAgencyAssignment"}}},"required":["platforms","agencies"]},"ResolveWechatRegistrationRequest":{"type":"object","properties":{"outcome":{"type":"string"},"appid":{"type":"string"}},"required":["outcome"]},"WechatEnterprise":{"type":"object","properties":{"name":{"type":"string"},"code":{"type":"string"},"component_phone":{"type":"string"},"code_type":{"type":"integer","deprecated":true},"legal_persona_name":{"type":"string","deprecated":true},"legal_persona_wechat":{"type":"string","deprecated":true}},"required":["name","code","component_phone"]},"WechatRegistrationRequest":{"type":"object","properties":{"request_id":{"type":"string"},"method":{"type":"string"},"source_appid":{"type":"string"},"enterprise":{"$ref":"#/components/schemas/WechatEnterprise"}},"required":["request_id","method"]},"BindMiniProgramRequest":{"type":"object","properties":{"appid":{"type":"string"}},"required":["appid"]},"ImportMiniProgramRequest":{"type":"object","properties":{"appid":{"type":"string"},"app_secret":{"type":"string","writeOnly":true},"ci_private_key":{"type":"string","writeOnly":true}},"required":["appid","app_secret","ci_private_key"]},"UpdateMiniProgramCredentialsRequest":{"type":"object","properties":{"app_secret":{"type":"string","writeOnly":true},"ci_private_key":{"type":"string","writeOnly":true}}},"WechatRegistrationAction":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"action_url":{"type":"string"},"qr_code":{"type":"string"},"message":{"type":"string"}},"required":["id","status"]},"MerchantMiniProgram":{"type":"object","properties":{"appid":{"type":"string"},"source":{"type":"string"},"auth_status":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"shop_id":{"type":"string","nullable":true},"shop_name":{"type":"string","nullable":true}},"required":["appid","source","auth_status","updated_at"]},"WechatRegistrationSummary":{"type":"object","properties":{"id":{"type":"string"},"method":{"type":"string"},"source_appid":{"type":"string"},"status":{"type":"string"},"mini_appid":{"type":"string"},"message":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","method","source_appid","status","mini_appid","message","created_at","updated_at"]},"MerchantMiniPrograms":{"type":"object","properties":{"api_egress_ips":{"type":"string"},"ci_egress_ips":{"type":"string"},"programs":{"type":"array","items":{"$ref":"#/components/schemas/MerchantMiniProgram"}},"registrations":{"type":"array","items":{"$ref":"#/components/schemas/WechatRegistrationSummary"}},"platform_configured":{"type":"boolean"}},"required":["programs","registrations","platform_configured"]},"ShopApp":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"appid":{"type":"string"},"source":{"type":"string"},"auth_status":{"type":"string"},"created_at":{"type":"string","format":"date-time"}},"required":["id","kind","appid","source","auth_status","created_at"]},"ShopAppList":{"type":"object","properties":{"api_egress_ips":{"type":"string"},"ci_egress_ips":{"type":"string"},"apps":{"type":"array","items":{"$ref":"#/components/schemas/ShopApp"}}},"required":["apps"]},"ShopAppBinding":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"TenantAPIKey":{"type":"object","additionalProperties":false,"required":["id","display_name","enabled","created_at"],"properties":{"id":{"type":"string","format":"uuid","x-go-type":"string","x-go-name":"ID"},"display_name":{"type":"string","minLength":1,"maxLength":256},"enabled":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}},"TenantAPIKeyList":{"type":"object","additionalProperties":false,"required":["tenant_id","keys"],"properties":{"tenant_id":{"type":"string","format":"uuid","x-go-type":"string","x-go-name":"TenantID"},"keys":{"type":"array","items":{"$ref":"#/components/schemas/TenantAPIKey"}}}},"TenantKeyName":{"type":"object","additionalProperties":false,"required":["display_name"],"properties":{"display_name":{"type":"string","minLength":1,"maxLength":256}}},"CreatedTenantAPIKey":{"type":"object","additionalProperties":false,"required":["id","secret","display_name"],"properties":{"id":{"type":"string","format":"uuid","x-go-type":"string","x-go-name":"ID"},"display_name":{"type":"string","minLength":1,"maxLength":256},"secret":{"type":"string","description":"Returned only on creation."}}},"LoginRequest":{"type":"object","additionalProperties":false,"properties":{"username":{"type":"string"},"password":{"type":"string"}},"required":["username","password"]},"SessionTokens":{"type":"object","required":["token","expires_at"],"properties":{"token":{"type":"string","description":"Access token for the session."},"expires_at":{"type":"string","format":"date-time"},"refresh_token":{"type":"string","description":"Single-use token for the refresh endpoint. Issued on new logins and inherited as a separate token by selected identity sessions."},"refresh_expires_at":{"type":"string","format":"date-time","description":"Fixed refresh deadline shared by the login session and its selected identities."}}},"MerchantAdminBinding":{"type":"object","required":["employee_id","user_id","username"],"properties":{"employee_id":{"type":"string","nullable":true},"user_id":{"type":"string","nullable":true},"username":{"type":"string","nullable":true}}},"MerchantAdminBindingRequest":{"type":"object","additionalProperties":false,"description":"Supply an existing user_id or both username and password for a new login.","properties":{"user_id":{"type":"string","x-go-type-skip-optional-pointer":true},"username":{"type":"string","x-go-type-skip-optional-pointer":true},"password":{"type":"string","x-go-type-skip-optional-pointer":true},"expected_user_id":{"type":"string","description":"Optional previously observed user ID. An empty string expects an unbound identity. An already-applied request succeeds."}}},"CreateOrganizationRequest":{"type":"object","additionalProperties":false,"properties":{"display_name":{"type":"string"},"username":{"type":"string","x-go-type-skip-optional-pointer":true},"password":{"type":"string","x-go-type-skip-optional-pointer":true,"description":"8..72 bytes."},"user_id":{"type":"string","description":"Bind an existing unified login user; omit username and password when set.","x-go-type-skip-optional-pointer":true}},"required":["display_name"]},"CreateShopRequest":{"type":"object","additionalProperties":false,"properties":{"uid":{"type":"string"},"display_name":{"type":"string"}},"required":["uid","display_name"]},"UpdateShopRequest":{"type":"object","additionalProperties":false,"properties":{"display_name":{"type":"string"},"event_webhook_url":{"type":"string"}},"required":["display_name","event_webhook_url"]},"NameRequest":{"type":"object","additionalProperties":false,"properties":{"display_name":{"type":"string"}},"required":["display_name"]},"EmployeeRequest":{"type":"object","additionalProperties":false,"properties":{"username":{"type":"string","x-go-type-skip-optional-pointer":true},"password":{"type":"string","x-go-type-skip-optional-pointer":true,"description":"8..72 bytes."},"display_name":{"type":"string"},"user_id":{"type":"string","description":"Bind an existing unified login user; omit username and password when set.","x-go-type-skip-optional-pointer":true}},"required":["display_name"]},"PasswordRequest":{"type":"object","additionalProperties":false,"properties":{"expected_user_id":{"type":"string","description":"When supplied, reset only if this login still owns the employee identity."},"password":{"type":"string","description":"8..72 bytes."}},"required":["password"]},"PolicyRequest":{"type":"object","additionalProperties":false,"properties":{"display_name":{"type":"string"},"statements":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["display_name","statements"]},"AgencyConnectionRequest":{"type":"object","additionalProperties":false,"properties":{"payment_system_id":{"type":"string"},"display_name":{"type":"string"},"config":{"type":"object","additionalProperties":{"type":"string"}}},"required":["payment_system_id","display_name","config"]},"MerchantConnectionRequest":{"type":"object","additionalProperties":false,"properties":{"sales_agency_payment_connection_id":{"type":"string"},"display_name":{"type":"string"},"config":{"type":"object","additionalProperties":{"type":"string"}}},"required":["sales_agency_payment_connection_id","display_name","config"]},"UpdateConnectionRequest":{"type":"object","additionalProperties":false,"properties":{"display_name":{"type":"string"},"enabled":{"type":"boolean"},"config":{"type":"object","additionalProperties":{"type":"string"}}},"required":["display_name","enabled","config"]},"WebhookRequest":{"type":"object","additionalProperties":false,"properties":{"url":{"type":"string"}},"required":["url"]},"MerchantWebhookKeyRotation":{"type":"object","additionalProperties":false,"properties":{"merchant_id":{"type":"string"},"active_key_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}},"required":["merchant_id","active_key_id","updated_at"]},"WebhookSigningKeys":{"type":"object","additionalProperties":false,"properties":{"key_id":{"type":"string","description":"Active signing key ID."},"public_key":{"type":"string","description":"Active 32-byte Ed25519 public key, encoded as unpadded base64url."},"verification_keys":{"type":"array","description":"Public keys for the active key and previous versions used by queued deliveries.","items":{"$ref":"#/components/schemas/WebhookVerificationKey"}}},"required":["key_id","public_key","verification_keys"]},"AgencyWebhookConfig":{"type":"object","additionalProperties":false,"properties":{"url":{"type":"string"},"key_id":{"type":"string","description":"Active signing key ID."},"public_key":{"type":"string","description":"Active 32-byte Ed25519 public key, encoded as unpadded base64url."},"verification_keys":{"type":"array","description":"Public keys for the active key and previous versions used by queued deliveries.","items":{"$ref":"#/components/schemas/WebhookVerificationKey"}}},"required":["url","key_id","public_key","verification_keys"]},"WebhookVerificationKey":{"type":"object","additionalProperties":false,"properties":{"key_id":{"type":"string"},"public_key":{"type":"string","description":"32-byte Ed25519 public key, encoded as unpadded base64url."},"retired_at":{"type":"string","format":"date-time","description":"When the key stopped being used for new deliveries."}},"required":["key_id","public_key"]},"PaymentRequest":{"type":"object","additionalProperties":false,"properties":{"external_id":{"type":"string"},"order_id":{"type":"string"},"amount_micro_yuan":{"type":"string","pattern":"^[1-9][0-9]*$"},"bar_code":{"type":"string","x-go-type-skip-optional-pointer":true},"client_ip":{"type":"string","description":"Optional IPv4 or IPv6 address of the payer. Shops using ip_region use this address to select a payment connection.","x-go-type-skip-optional-pointer":true},"ledger":{"$ref":"#/components/schemas/PaymentLedger"},"merchant_payment_connection_id":{"type":"string","description":"Optional explicit connection from the shop's selected channels. Bypasses automatic selection and failover.","format":"uuid","x-go-type":"string"},"open_id":{"type":"string","minLength":1,"maxLength":256,"x-go-type-skip-optional-pointer":true,"description":"WeChat openid for the paying application or Alipay user_id."},"app_id":{"type":"string","minLength":1,"maxLength":256,"x-go-type-skip-optional-pointer":true,"description":"WeChat application ID associated with open_id. Omit to use the channel default."}},"required":["external_id","amount_micro_yuan"],"description":"Common service representation of native method inputs. The request URL selects the method."},"WechatJSAPIRequest":{"type":"object","additionalProperties":false,"properties":{"external_id":{"type":"string"},"order_id":{"type":"string"},"amount_micro_yuan":{"type":"string","pattern":"^[1-9][0-9]*$"},"client_ip":{"type":"string","description":"Optional IPv4 or IPv6 address of the payer. Shops using ip_region use this address to select a payment connection.","x-go-type-skip-optional-pointer":true},"ledger":{"$ref":"#/components/schemas/PaymentLedger"},"merchant_payment_connection_id":{"type":"string","description":"Optional explicit connection from the shop's selected channels. Bypasses automatic selection and failover.","format":"uuid","x-go-type":"string"},"open_id":{"type":"string","minLength":1,"maxLength":256,"x-go-type-skip-optional-pointer":true,"description":"WeChat openid for the paying application or Alipay user_id."},"app_id":{"type":"string","minLength":1,"maxLength":256,"x-go-type-skip-optional-pointer":true,"description":"WeChat application ID associated with open_id. Omit to use the channel default."}},"required":["external_id","amount_micro_yuan","open_id"]},"AlipayJSAPIRequest":{"type":"object","additionalProperties":false,"properties":{"external_id":{"type":"string"},"order_id":{"type":"string"},"amount_micro_yuan":{"type":"string","pattern":"^[1-9][0-9]*$"},"client_ip":{"type":"string","description":"Optional IPv4 or IPv6 address of the payer. Shops using ip_region use this address to select a payment connection.","x-go-type-skip-optional-pointer":true},"ledger":{"$ref":"#/components/schemas/PaymentLedger"},"merchant_payment_connection_id":{"type":"string","description":"Optional explicit connection from the shop's selected channels. Bypasses automatic selection and failover.","format":"uuid","x-go-type":"string"},"open_id":{"type":"string","minLength":1,"maxLength":256,"x-go-type-skip-optional-pointer":true,"description":"WeChat openid for the paying application or Alipay user_id."}},"required":["external_id","amount_micro_yuan","open_id"]},"WechatBarcodeRequest":{"type":"object","additionalProperties":false,"properties":{"external_id":{"type":"string"},"order_id":{"type":"string"},"amount_micro_yuan":{"type":"string","pattern":"^[1-9][0-9]*$"},"bar_code":{"type":"string","x-go-type-skip-optional-pointer":true,"pattern":"^1[0-5][0-9]{16}$"},"client_ip":{"type":"string","description":"Optional IPv4 or IPv6 address of the payer. Shops using ip_region use this address to select a payment connection.","x-go-type-skip-optional-pointer":true},"ledger":{"$ref":"#/components/schemas/PaymentLedger"},"merchant_payment_connection_id":{"type":"string","description":"Optional explicit connection from the shop's selected channels. Bypasses automatic selection and failover.","format":"uuid","x-go-type":"string"}},"required":["external_id","amount_micro_yuan","bar_code"]},"AlipayBarcodeRequest":{"type":"object","additionalProperties":false,"properties":{"external_id":{"type":"string"},"order_id":{"type":"string"},"amount_micro_yuan":{"type":"string","pattern":"^[1-9][0-9]*$"},"bar_code":{"type":"string","x-go-type-skip-optional-pointer":true,"pattern":"^(2[5-9]|30)[0-9]{14,22}$"},"client_ip":{"type":"string","description":"Optional IPv4 or IPv6 address of the payer. Shops using ip_region use this address to select a payment connection.","x-go-type-skip-optional-pointer":true},"ledger":{"$ref":"#/components/schemas/PaymentLedger"},"merchant_payment_connection_id":{"type":"string","description":"Optional explicit connection from the shop's selected channels. Bypasses automatic selection and failover.","format":"uuid","x-go-type":"string"}},"required":["external_id","amount_micro_yuan","bar_code"]},"WechatJSAPIParams":{"type":"object","additionalProperties":false,"properties":{"appId":{"type":"string"},"timeStamp":{"type":"string"},"nonceStr":{"type":"string"},"package":{"type":"string"},"signType":{"type":"string"},"paySign":{"type":"string"}},"required":["appId","timeStamp","nonceStr","package","signType","paySign"]},"AlipayJSAPIParams":{"type":"object","additionalProperties":false,"properties":{"tradeNO":{"type":"string","x-go-name":"TradeNO"}},"required":["tradeNO"]},"ExternalUnipayRequest":{"type":"object","additionalProperties":false,"properties":{"external_id":{"type":"string"},"order_id":{"type":"string"},"amount_micro_yuan":{"type":"string","pattern":"^[1-9][0-9]*$"},"client_ip":{"type":"string","description":"Optional IPv4 or IPv6 address of the payer. Shops using ip_region use this address to select a payment connection.","x-go-type-skip-optional-pointer":true},"ledger":{"$ref":"#/components/schemas/PaymentLedger"},"merchant_payment_connection_id":{"type":"string","description":"Optional explicit connection from the shop's selected channels. Bypasses automatic selection and failover.","format":"uuid","x-go-type":"string"}},"required":["external_id","amount_micro_yuan"]},"ExternalUnipayParams":{"type":"object","additionalProperties":false,"required":["url"],"properties":{"url":{"type":"string","format":"uri","description":"Original HTTPS URL issued by the provider, including its query string."}}},"NativePaymentResult":{"type":"object","required":["state"],"properties":{"state":{"type":"string"},"wechat_jsapi":{"$ref":"#/components/schemas/WechatJSAPIParams"},"alipay_jsapi":{"$ref":"#/components/schemas/AlipayJSAPIParams"},"external_unipay":{"$ref":"#/components/schemas/ExternalUnipayParams"},"expires_at":{"type":"string","format":"date-time"}},"description":"Wallet parameters or a provider-hosted cashier link while the payment is pending. A submitting payment can be polled by ID. An expired result requires reconciliation.","nullable":true},"CheckoutSession":{"type":"object","required":["checkout_url","expires_at"],"properties":{"checkout_url":{"type":"string"},"expires_at":{"type":"string","format":"date-time"}}},"PaymentRecord":{"type":"object","additionalProperties":true,"required":["id","mode","status","ledger_status","external_id","amount_micro_yuan"],"properties":{"id":{"type":"string"},"mode":{"type":"string"},"status":{"type":"string"},"ledger_status":{"type":"string"},"provider_response":{"$ref":"#/components/schemas/NativePaymentResult"},"amount_micro_yuan":{"type":"string"},"external_id":{"type":"string"}}},"MethodPaymentResponse":{"type":"object","additionalProperties":false,"properties":{"payment":{"$ref":"#/components/schemas/PaymentRecord"}},"required":["payment"]},"SupportedPaymentMethods":{"type":"object","additionalProperties":false,"properties":{"supported_methods":{"type":"array","items":{"type":"string","enum":["wechat_jsapi","alipay_jsapi","wechat_barcode","alipay_barcode","external_unipay"],"x-enum-varnames":["SupportedWechatJSAPI","SupportedAlipayJSAPI","SupportedWechatBarcode","SupportedAlipayBarcode","SupportedExternalUnipay"]}}},"required":["supported_methods"]},"ProductRequest":{"type":"object","additionalProperties":false,"properties":{"sku":{"type":"string"},"display_name":{"type":"string"},"price_micro_yuan":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"listed":{"type":"boolean"}},"required":["sku","display_name","price_micro_yuan","listed"]},"OrderRequest":{"type":"object","additionalProperties":false,"properties":{"external_id":{"type":"string"},"customer_id":{"type":"string"},"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"product_id":{"type":"string"},"quantity":{"type":"string","pattern":"^[1-9][0-9]*$"}},"required":["product_id","quantity"]}}},"required":["external_id","items"]},"SettingRequest":{"type":"object","additionalProperties":false,"properties":{"value":{}},"required":["value"]},"InventoryRequest":{"type":"object","additionalProperties":false,"properties":{"idempotency_key":{"type":"string"},"amount":{"type":"string","pattern":"^[1-9][0-9]*$"},"direction":{"type":"string","enum":["in","out"]}},"required":["idempotency_key","amount","direction"]},"FileRequest":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string"},"content_type":{"type":"string"},"size":{"type":"integer","format":"int64"},"is_public":{"type":"boolean"}},"required":["name","content_type","size","is_public"]},"AvatarRequest":{"type":"object","additionalProperties":false,"properties":{"file_id":{"type":"string"}},"required":["file_id"]},"MockPaymentRequest":{"type":"object","additionalProperties":false,"required":["status"],"properties":{"status":{"type":"string","enum":["pending","succeeded","failed","closed"]},"notification":{"type":"string","enum":["both","backend","organization","none"],"x-go-type-skip-optional-pointer":true},"fault":{"type":"string","enum":["none","bad_signature","wrong_amount"],"x-go-type-skip-optional-pointer":true},"query_mode":{"type":"string","enum":["normal","not_found","timeout"],"x-go-type-skip-optional-pointer":true}}},"EmployeeUpdateRequest":{"type":"object","additionalProperties":false,"required":["display_name","enabled"],"properties":{"display_name":{"type":"string"},"enabled":{"type":"boolean"}}},"SelectIdentityRequest":{"type":"object","additionalProperties":false,"properties":{"employee_id":{"type":"string"},"refresh_token":{"type":"string","x-go-type-skip-optional-pointer":true,"description":"The current session's refresh token, to issue a refreshable identity session."},"realm":{"type":"string","enum":["platform","agency","merchant"]}},"required":["employee_id","realm"]},"ChangePasswordRequest":{"type":"object","additionalProperties":false,"properties":{"current_password":{"type":"string"},"password":{"type":"string","description":"8..72 bytes."}},"required":["current_password","password"]},"RefundRequest":{"type":"object","additionalProperties":false,"properties":{"external_id":{"type":"string"},"amount_micro_yuan":{"type":"string"},"reason":{"type":"string"},"ledger":{"$ref":"#/components/schemas/PaymentLedger"}},"required":["external_id","amount_micro_yuan","reason"]},"MockRefundRequest":{"type":"object","additionalProperties":false,"required":["status"],"properties":{"status":{"type":"string","enum":["succeeded","failed"]},"notification":{"type":"string","enum":["both","backend","organization","none"],"x-go-type-skip-optional-pointer":true},"fault":{"type":"string","enum":["none","bad_signature","wrong_amount"],"x-go-type-skip-optional-pointer":true}}},"PaymentLedger":{"type":"object","additionalProperties":false,"required":["entries"],"properties":{"accounts":{"type":"array","items":{"$ref":"#/components/schemas/PaymentAccount"}},"entries":{"type":"array","minItems":1,"maxItems":256,"items":{"$ref":"#/components/schemas/PaymentEntry"}},"events":{"type":"array","maxItems":31,"items":{"$ref":"#/components/schemas/PaymentEvent"}},"metadata":{"x-go-type":"json.RawMessage","x-go-type-skip-optional-pointer":true}},"description":"HCL transaction intent. Use $channel as the channel account UID; Boma supplies the ledger and idempotency key. Currency is _boma.cny_micro_yuan."},"PaymentAccount":{"type":"object","additionalProperties":false,"required":["uid","resource_uid","non_negative"],"properties":{"uid":{"type":"string"},"resource_uid":{"type":"string"},"non_negative":{"type":"boolean"}}},"PaymentEntry":{"type":"object","additionalProperties":false,"required":["debit","credit","amount"],"properties":{"debit":{"type":"string"},"credit":{"type":"string"},"amount":{"type":"string","pattern":"^[1-9][0-9]*$"}}},"PaymentEvent":{"type":"object","additionalProperties":false,"required":["type"],"properties":{"type":{"type":"string"},"key":{"type":"string"},"payload":{"x-go-type":"json.RawMessage","x-go-type-skip-optional-pointer":true}}},"PaymentRouting":{"type":"object","additionalProperties":false,"required":["strategy","connection_ids"],"properties":{"strategy":{"type":"string","description":"Channel selection policy. ordered_failover uses configured order, random shuffles each new payment, and ip_region prioritizes connections matching the payer's client_ip location."},"connection_ids":{"type":"array","maxItems":32,"uniqueItems":true,"items":{"type":"string","format":"uuid","x-go-type":"string"},"description":"Ordered payment connection IDs owned by the shop's merchant. An empty list clears the shop's channel selection."},"region_rules":{"type":"array","maxItems":256,"x-go-type-skip-optional-pointer":true,"items":{"$ref":"#/components/schemas/PaymentRegionRule"},"description":"For ip_region, assign each location to one selected connection. City matches precede province matches, then country matches, then the remaining connections in configured order. Missing or unlocated payer IPs use configured order."}}},"PaymentRegionRule":{"type":"object","additionalProperties":false,"required":["country_code","connection_id"],"properties":{"country_code":{"type":"string","pattern":"^[A-Za-z]{2}$","description":"Two-letter country or region code, for example CN."},"province":{"type":"string","maxLength":100,"x-go-type-skip-optional-pointer":true,"description":"Province or state name in the IP database, for example 广东省."},"city":{"type":"string","maxLength":100,"x-go-type-skip-optional-pointer":true,"description":"City name within the specified province, for example 深圳市."},"connection_id":{"type":"string","format":"uuid","x-go-type":"string","x-go-name":"ConnectionID"}}},"UserSearchResult":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string"},"username":{"type":"string"},"display_name":{"type":"string"}},"required":["id","username","display_name"]},"MFACodeRequest":{"type":"object","required":["code"],"properties":{"code":{"type":"string","description":"Six-digit TOTP code, or a recovery code on the recovery endpoint."}}},"MFAReplaceRequest":{"type":"object","required":["current_password","code"],"properties":{"current_password":{"type":"string"},"code":{"type":"string","description":"Current authenticator code. Empty only when enrolling an account without an authenticator."}}},"CreateAPIKeyRequest":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":256}}},"CreatedAPIKey":{"type":"object","additionalProperties":false,"required":["id","secret"],"properties":{"id":{"type":"string","format":"uuid","x-go-type":"string"},"secret":{"type":"string","description":"32 random bytes encoded as unpadded base64url. Returned once."}}},"UserAPIKey":{"type":"object","additionalProperties":false,"required":["id","name","realm","employee_id","employee_name","created_at","last_used_at"],"properties":{"id":{"type":"string","format":"uuid","x-go-type":"string"},"name":{"type":"string"},"realm":{"type":"string"},"employee_id":{"type":"string","format":"uuid","x-go-type":"string"},"employee_name":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"last_used_at":{"type":"string","format":"date-time","nullable":true}}}},"securitySchemes":{"BearerSession":{"type":"http","scheme":"bearer","description":"Session token, or the specific challenge/refresh token required by an auth operation."},"RequestSignature":{"type":"apiKey","in":"header","name":"Signature","description":"HMAC-SHA256 using the decoded API Secret. See the user API key signing profile in the Boma README."},"SignatureInput":{"type":"apiKey","in":"header","name":"Signature-Input","description":"Covered components and signed created, keyid and nonce parameters."},"ContentDigest":{"type":"apiKey","in":"header","name":"Content-Digest","description":"SHA-256 digest of the exact request body, including an empty body."}}},"security":[{"BearerSession":[]},{"RequestSignature":[],"SignatureInput":[],"ContentDigest":[]}],"servers":[{"url":"https://api.boma.spopc.com"}]}