{"openapi":"3.1.0","info":{"title":"DotPay Merchant and Address API","version":"0.0.1","description":"Public synthetic preview for Merchant onboarding and Mexican address lookup. While the preview is enabled, anyone can read and modify the shared demo merchants. Use invented contacts, RFCs and addresses. Both catalogs contain invented fixtures."},"paths":{"/merchants":{"get":{"operationId":"listMerchants","summary":"List merchants","tags":["Merchants"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Page ordered by UUID ascending.","headers":{"Cache-Control":{"schema":{"type":"string","const":"no-store"}},"API-Version":{"description":"Present after successful version negotiation.","schema":{"type":"string","const":"0.0.1"}},"Vary":{"schema":{"type":"string"},"example":"API-Version"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantPage"},"example":{"items":[{"commercial_name":"Tienda de Prueba","business_activity":{"system":"dotpay-synthetic-mcc","edition":"test-v1","code":"0001","label":"Tienda de prueba"},"persona":{"id":"8281f3c6-012a-493d-be40-bec195ab6a4e","full_name":"Luz Ejemplo","email":"luz@example.com","phone_number":"5550000100","country_code":"+52"},"fiscal_profile":{"id":"46c150b5-dc6c-4ab8-aa9e-1062ec9abdc4","taxpayer_type":"persona_moral","registered_name":"Comercio de Prueba","rfc":"ZZZ000101ZZ0","address":{"id":"f13380f4-1269-49a6-8302-85b262bff5a0","country":"MX","postal_code":"01234","catalog_version":"synthetic-v1","entry_id":"09:001:0001","street":"Calle de Prueba","exterior_number":"S/N","interior_number":null,"state":{"id":"09","label":"Entidad de prueba"},"municipality":{"id":"001","label":"Municipio de prueba"},"city":null,"settlement":{"id":"0001","label":"Colonia Álamo de prueba"}}},"id":"8b7f8b7d-3ac0-4ce2-b85f-578f3113022d"}],"limit":25,"offset":0,"has_more":false}}}},"400":{"$ref":"#/components/responses/400"},"406":{"$ref":"#/components/responses/406"},"500":{"$ref":"#/components/responses/500"},"503":{"$ref":"#/components/responses/503"}}},"post":{"operationId":"createMerchant","summary":"Register a merchant","tags":["Merchants"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}],"responses":{"201":{"description":"Merchant, contact, fiscal profile and address created atomically.","headers":{"Cache-Control":{"schema":{"type":"string","const":"no-store"}},"API-Version":{"description":"Present after successful version negotiation.","schema":{"type":"string","const":"0.0.1"}},"Vary":{"schema":{"type":"string"},"example":"API-Version"},"Location":{"schema":{"type":"string"},"example":"/merchants/8b7f8b7d-3ac0-4ce2-b85f-578f3113022d"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Merchant"},"example":{"commercial_name":"Tienda de Prueba","business_activity":{"system":"dotpay-synthetic-mcc","edition":"test-v1","code":"0001","label":"Tienda de prueba"},"persona":{"id":"8281f3c6-012a-493d-be40-bec195ab6a4e","full_name":"Luz Ejemplo","email":"luz@example.com","phone_number":"5550000100","country_code":"+52"},"fiscal_profile":{"id":"46c150b5-dc6c-4ab8-aa9e-1062ec9abdc4","taxpayer_type":"persona_moral","registered_name":"Comercio de Prueba","rfc":"ZZZ000101ZZ0","address":{"id":"f13380f4-1269-49a6-8302-85b262bff5a0","country":"MX","postal_code":"01234","catalog_version":"synthetic-v1","entry_id":"09:001:0001","street":"Calle de Prueba","exterior_number":"S/N","interior_number":null,"state":{"id":"09","label":"Entidad de prueba"},"municipality":{"id":"001","label":"Municipio de prueba"},"city":null,"settlement":{"id":"0001","label":"Colonia Álamo de prueba"}}},"id":"8b7f8b7d-3ac0-4ce2-b85f-578f3113022d"}}}},"400":{"$ref":"#/components/responses/400"},"406":{"$ref":"#/components/responses/406"},"415":{"$ref":"#/components/responses/415"},"500":{"$ref":"#/components/responses/500"},"503":{"$ref":"#/components/responses/503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantWrite"},"examples":{"es":{"summary":"Comercio sintético (persona moral)","value":{"commercial_name":"Tienda de Prueba","business_activity":{"system":"dotpay-synthetic-mcc","edition":"test-v1","code":"0001"},"persona":{"full_name":"Luz Ejemplo","email":"luz@example.com","phone_number":"5550000100","country_code":"+52"},"fiscal_profile":{"taxpayer_type":"persona_moral","registered_name":"Comercio de Prueba","rfc":"ZZZ000101ZZ0","address":{"country":"MX","postal_code":"01234","catalog_version":"synthetic-v1","entry_id":"09:001:0001","street":"Calle de Prueba","exterior_number":"S/N","interior_number":null}}}},"en":{"summary":"Synthetic merchant (individual taxpayer)","value":{"commercial_name":"Sample Corner Shop","business_activity":{"system":"dotpay-synthetic-mcc","edition":"test-v1","code":"0001"},"persona":{"full_name":"Alex Sample","email":"alex@example.com","phone_number":"5550000100","country_code":"+52"},"fiscal_profile":{"taxpayer_type":"persona_fisica","registered_name":"Alex Sample","rfc":"ZZZA000101ZZ0","address":{"country":"MX","postal_code":"01234","catalog_version":"synthetic-v1","entry_id":"09:001:0001","street":"Calle Ejemplo","exterior_number":"14 bis","interior_number":"2A"}}}}}}}}}},"/merchants/{id}":{"get":{"operationId":"getMerchant","summary":"Retrieve a merchant","tags":["Merchants"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"8b7f8b7d-3ac0-4ce2-b85f-578f3113022d"}],"responses":{"200":{"description":"Success","headers":{"Cache-Control":{"schema":{"type":"string","const":"no-store"}},"API-Version":{"description":"Present after successful version negotiation.","schema":{"type":"string","const":"0.0.1"}},"Vary":{"schema":{"type":"string"},"example":"API-Version"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Merchant"},"example":{"commercial_name":"Tienda de Prueba","business_activity":{"system":"dotpay-synthetic-mcc","edition":"test-v1","code":"0001","label":"Tienda de prueba"},"persona":{"id":"8281f3c6-012a-493d-be40-bec195ab6a4e","full_name":"Luz Ejemplo","email":"luz@example.com","phone_number":"5550000100","country_code":"+52"},"fiscal_profile":{"id":"46c150b5-dc6c-4ab8-aa9e-1062ec9abdc4","taxpayer_type":"persona_moral","registered_name":"Comercio de Prueba","rfc":"ZZZ000101ZZ0","address":{"id":"f13380f4-1269-49a6-8302-85b262bff5a0","country":"MX","postal_code":"01234","catalog_version":"synthetic-v1","entry_id":"09:001:0001","street":"Calle de Prueba","exterior_number":"S/N","interior_number":null,"state":{"id":"09","label":"Entidad de prueba"},"municipality":{"id":"001","label":"Municipio de prueba"},"city":null,"settlement":{"id":"0001","label":"Colonia Álamo de prueba"}}},"id":"8b7f8b7d-3ac0-4ce2-b85f-578f3113022d"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"406":{"$ref":"#/components/responses/406"},"500":{"$ref":"#/components/responses/500"},"503":{"$ref":"#/components/responses/503"}}},"put":{"operationId":"replaceMerchant","summary":"Replace a merchant profile","tags":["Merchants"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"8b7f8b7d-3ac0-4ce2-b85f-578f3113022d"}],"responses":{"200":{"description":"Success","headers":{"Cache-Control":{"schema":{"type":"string","const":"no-store"}},"API-Version":{"description":"Present after successful version negotiation.","schema":{"type":"string","const":"0.0.1"}},"Vary":{"schema":{"type":"string"},"example":"API-Version"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Merchant"},"example":{"commercial_name":"Tienda de Prueba","business_activity":{"system":"dotpay-synthetic-mcc","edition":"test-v1","code":"0001","label":"Tienda de prueba"},"persona":{"id":"8281f3c6-012a-493d-be40-bec195ab6a4e","full_name":"Luz Ejemplo","email":"luz@example.com","phone_number":"5550000100","country_code":"+52"},"fiscal_profile":{"id":"46c150b5-dc6c-4ab8-aa9e-1062ec9abdc4","taxpayer_type":"persona_moral","registered_name":"Comercio de Prueba","rfc":"ZZZ000101ZZ0","address":{"id":"f13380f4-1269-49a6-8302-85b262bff5a0","country":"MX","postal_code":"01234","catalog_version":"synthetic-v1","entry_id":"09:001:0001","street":"Calle de Prueba","exterior_number":"S/N","interior_number":null,"state":{"id":"09","label":"Entidad de prueba"},"municipality":{"id":"001","label":"Municipio de prueba"},"city":null,"settlement":{"id":"0001","label":"Colonia Álamo de prueba"}}},"id":"8b7f8b7d-3ac0-4ce2-b85f-578f3113022d"}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"406":{"$ref":"#/components/responses/406"},"415":{"$ref":"#/components/responses/415"},"500":{"$ref":"#/components/responses/500"},"503":{"$ref":"#/components/responses/503"}},"description":"Full replacement preserves all IDs. The last successful write wins. An unchanged geographic selection or activity code may retain its original edition after a catalog refresh. Changed selections must be active.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantWrite"},"examples":{"es":{"summary":"Comercio sintético (persona moral)","value":{"commercial_name":"Tienda de Prueba","business_activity":{"system":"dotpay-synthetic-mcc","edition":"test-v1","code":"0001"},"persona":{"full_name":"Luz Ejemplo","email":"luz@example.com","phone_number":"5550000100","country_code":"+52"},"fiscal_profile":{"taxpayer_type":"persona_moral","registered_name":"Comercio de Prueba","rfc":"ZZZ000101ZZ0","address":{"country":"MX","postal_code":"01234","catalog_version":"synthetic-v1","entry_id":"09:001:0001","street":"Calle de Prueba","exterior_number":"S/N","interior_number":null}}}},"en":{"summary":"Synthetic merchant (individual taxpayer)","value":{"commercial_name":"Sample Corner Shop","business_activity":{"system":"dotpay-synthetic-mcc","edition":"test-v1","code":"0001"},"persona":{"full_name":"Alex Sample","email":"alex@example.com","phone_number":"5550000100","country_code":"+52"},"fiscal_profile":{"taxpayer_type":"persona_fisica","registered_name":"Alex Sample","rfc":"ZZZA000101ZZ0","address":{"country":"MX","postal_code":"01234","catalog_version":"synthetic-v1","entry_id":"09:001:0001","street":"Calle Ejemplo","exterior_number":"14 bis","interior_number":"2A"}}}}}}}}}},"/merchants/rfc-check":{"post":{"operationId":"checkMerchantRfc","summary":"Check whether another merchant uses an RFC","tags":["Merchants"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}],"responses":{"200":{"description":"Only whether a normalized RFC matches another merchant in the shared demo dataset.","headers":{"Cache-Control":{"schema":{"type":"string","const":"no-store"}},"API-Version":{"description":"Present after successful version negotiation.","schema":{"type":"string","const":"0.0.1"}},"Vary":{"schema":{"type":"string"},"example":"API-Version"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RfcCheck"},"example":{"match":false}}}},"400":{"$ref":"#/components/responses/400"},"406":{"$ref":"#/components/responses/406"},"415":{"$ref":"#/components/responses/415"},"500":{"$ref":"#/components/responses/500"},"503":{"$ref":"#/components/responses/503"}},"description":"Informational check. Multiple merchants may save the same RFC. Omit exclude_merchant_id when creating. Calls never return matching profiles.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RfcCheckWrite"},"example":{"rfc":"ZZZ000101ZZ0","exclude_merchant_id":"8b7f8b7d-3ac0-4ce2-b85f-578f3113022d"}}}}}},"/merchant-catalogs/business-activities":{"get":{"operationId":"listBusinessActivities","summary":"Search business activity codes","tags":["Merchant catalogs"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"query","in":"query","required":false,"schema":{"type":"string","maxLength":100},"description":"Case-insensitive substring of code or Spanish label. Omit for all entries."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Success","headers":{"Cache-Control":{"schema":{"type":"string","const":"no-store"}},"API-Version":{"description":"Present after successful version negotiation.","schema":{"type":"string","const":"0.0.1"}},"Vary":{"schema":{"type":"string"},"example":"API-Version"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessActivityPage"},"example":{"items":[{"system":"dotpay-synthetic-mcc","edition":"test-v1","code":"0001","label":"Tienda de prueba"}],"limit":25,"offset":0,"has_more":false}}}},"400":{"$ref":"#/components/responses/400"},"406":{"$ref":"#/components/responses/406"},"500":{"$ref":"#/components/responses/500"},"503":{"$ref":"#/components/responses/503"}}}},"/address-catalogs/{country}/{postal_code}":{"get":{"operationId":"lookupPostalCode","summary":"Find Mexican postal candidates","tags":["Addresses"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"country","in":"path","required":true,"schema":{"type":"string","const":"MX"},"example":"MX"},{"name":"postal_code","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]{5}$"},"example":"01234"}],"responses":{"200":{"description":"An unknown postal code returns an empty array.","headers":{"Cache-Control":{"schema":{"type":"string","const":"no-store"}},"API-Version":{"description":"Present after successful version negotiation.","schema":{"type":"string","const":"0.0.1"}},"Vary":{"schema":{"type":"string"},"example":"API-Version"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostalCandidates"},"example":{"items":[{"country":"MX","postal_code":"01234","catalog_version":"synthetic-v1","entry_id":"09:001:0001","state":{"id":"09","label":"Entidad de prueba"},"municipality":{"id":"001","label":"Municipio de prueba"},"city":null,"settlement":{"id":"0001","label":"Colonia Álamo de prueba"}}]}}}},"400":{"$ref":"#/components/responses/400"},"406":{"$ref":"#/components/responses/406"},"500":{"$ref":"#/components/responses/500"},"503":{"$ref":"#/components/responses/503"}},"description":"Validation uses the selected candidate’s full catalog tuple. An exact match validates catalog geography."}}},"servers":[{"url":"https://api.dotpay.mx","description":"DotPay public synthetic preview when enabled"},{"url":"http://127.0.0.1:18886","description":"Local synthetic preview"}],"security":[],"x-dotpay-source":{"repository":"https://github.com/DotPayMX/dotpay-backend","revision":"406129b83db91ac26f073079404259a8d06f3835","path":"api/merchants.openapi.json","sha256":"aceb48503ef9fbbaf7aac8f668e24789228bab9d20a0fd0430a45ec905f8fa61"},"components":{"parameters":{"ApiVersion":{"name":"API-Version","in":"header","required":false,"schema":{"type":"string","enum":["0.0.1","latest"],"default":"0.0.1"},"description":"Optional. Omit or send latest to resolve 0.0.1."}},"responses":{"400":{"description":"Malformed body, unsupported API-Version, invalid field, or invalid/stale catalog selection.","headers":{"Cache-Control":{"schema":{"type":"string","const":"no-store"}},"API-Version":{"description":"Present after successful version negotiation.","schema":{"type":"string","const":"0.0.1"}},"Vary":{"schema":{"type":"string"},"example":"API-Version"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"example":{"type":"about:blank","title":"Bad Request","status":400,"detail":"entry_id does not match the postal code in the active catalog.","instance":"/merchants"}}}},"404":{"description":"Merchant missing in the shared synthetic preview.","headers":{"Cache-Control":{"schema":{"type":"string","const":"no-store"}},"API-Version":{"description":"Present after successful version negotiation.","schema":{"type":"string","const":"0.0.1"}},"Vary":{"schema":{"type":"string"},"example":"API-Version"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"406":{"description":"Accept must allow application/json.","headers":{"Cache-Control":{"schema":{"type":"string","const":"no-store"}},"API-Version":{"description":"Present after successful version negotiation.","schema":{"type":"string","const":"0.0.1"}},"Vary":{"schema":{"type":"string"},"example":"API-Version"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"415":{"description":"Request body must use application/json.","headers":{"Cache-Control":{"schema":{"type":"string","const":"no-store"}},"API-Version":{"description":"Present after successful version negotiation.","schema":{"type":"string","const":"0.0.1"}},"Vary":{"schema":{"type":"string"},"example":"API-Version"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Unexpected error.","headers":{"Cache-Control":{"schema":{"type":"string","const":"no-store"}},"API-Version":{"description":"Present after successful version negotiation.","schema":{"type":"string","const":"0.0.1"}},"Vary":{"schema":{"type":"string"},"example":"API-Version"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"The required catalog or backing store is unavailable.","headers":{"Cache-Control":{"schema":{"type":"string","const":"no-store"}},"API-Version":{"description":"Present after successful version negotiation.","schema":{"type":"string","const":"0.0.1"}},"Vary":{"schema":{"type":"string"},"example":"API-Version"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"example":{"type":"about:blank","title":"Service Unavailable","status":503,"detail":"The postal catalog is temporarily unavailable.","instance":"/address-catalogs/MX/01234"}}}}},"schemas":{"PersonaWrite":{"type":"object","additionalProperties":false,"required":["full_name","email","phone_number","country_code"],"properties":{"full_name":{"type":"string","minLength":1,"maxLength":255},"email":{"type":"string","format":"email","maxLength":254},"phone_number":{"type":"string","pattern":"^[0-9]{1,14}$"},"country_code":{"type":"string","pattern":"^\\+[1-9][0-9]{0,2}$"}}},"Persona":{"type":"object","additionalProperties":false,"required":["id","full_name","email","phone_number","country_code"],"properties":{"id":{"type":"string","format":"uuid"},"full_name":{"type":"string","minLength":1,"maxLength":255},"email":{"type":"string","format":"email","maxLength":254},"phone_number":{"type":"string","pattern":"^[0-9]{1,14}$"},"country_code":{"type":"string","pattern":"^\\+[1-9][0-9]{0,2}$"}}},"GeographyLabel":{"type":"object","additionalProperties":false,"required":["id","label"],"properties":{"id":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"},"label":{"type":"string"}}},"PostalCandidate":{"type":"object","additionalProperties":false,"required":["country","postal_code","catalog_version","entry_id","state","municipality","city","settlement"],"properties":{"country":{"type":"string","const":"MX"},"postal_code":{"type":"string","pattern":"^[0-9]{5}$"},"catalog_version":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"},"entry_id":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"},"state":{"$ref":"#/components/schemas/GeographyLabel"},"municipality":{"$ref":"#/components/schemas/GeographyLabel"},"city":{"anyOf":[{"$ref":"#/components/schemas/GeographyLabel"},{"type":"null"}]},"settlement":{"anyOf":[{"$ref":"#/components/schemas/GeographyLabel"},{"type":"null"}]}}},"PostalCandidates":{"type":"object","additionalProperties":false,"required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PostalCandidate"}}}},"AddressWrite":{"type":"object","additionalProperties":false,"required":["country","postal_code","catalog_version","entry_id","street","exterior_number"],"properties":{"country":{"type":"string","const":"MX"},"postal_code":{"type":"string","pattern":"^[0-9]{5}$"},"catalog_version":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"},"entry_id":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"},"street":{"type":"string","minLength":1,"maxLength":255},"exterior_number":{"type":"string","minLength":1,"maxLength":50,"description":"A string, including S/N for sin número."},"interior_number":{"type":["string","null"],"maxLength":50,"description":"Omit or use null or blank for an absent unit."}}},"Address":{"type":"object","additionalProperties":false,"required":["id","country","postal_code","catalog_version","entry_id","state","municipality","city","settlement","street","exterior_number","interior_number"],"properties":{"id":{"type":"string","format":"uuid"},"country":{"type":"string","const":"MX"},"postal_code":{"type":"string","pattern":"^[0-9]{5}$"},"catalog_version":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"},"entry_id":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"},"state":{"$ref":"#/components/schemas/GeographyLabel"},"municipality":{"$ref":"#/components/schemas/GeographyLabel"},"city":{"anyOf":[{"$ref":"#/components/schemas/GeographyLabel"},{"type":"null"}]},"settlement":{"anyOf":[{"$ref":"#/components/schemas/GeographyLabel"},{"type":"null"}]},"street":{"type":"string","minLength":1,"maxLength":255},"exterior_number":{"type":"string","minLength":1,"maxLength":50,"description":"A string, including S/N for sin número."},"interior_number":{"type":["string","null"],"maxLength":50,"description":"Omit or use null or blank for an absent unit."}}},"BusinessActivitySelection":{"type":"object","additionalProperties":false,"required":["system","edition","code"],"properties":{"system":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"},"edition":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"},"code":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"}}},"BusinessActivity":{"type":"object","additionalProperties":false,"required":["system","edition","code","label"],"properties":{"system":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"},"edition":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"},"code":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"},"label":{"type":"string"}}},"BusinessActivityPage":{"type":"object","additionalProperties":false,"required":["items","limit","offset","has_more"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/BusinessActivity"}},"limit":{"type":"integer","minimum":1,"maximum":100},"offset":{"type":"integer","minimum":0},"has_more":{"type":"boolean"}}},"FiscalProfileWrite":{"type":"object","additionalProperties":false,"required":["taxpayer_type","registered_name","rfc","address"],"properties":{"taxpayer_type":{"type":"string","enum":["persona_fisica","persona_moral"],"description":"Persona física or Persona moral."},"registered_name":{"type":"string","minLength":1,"maxLength":255},"rfc":{"type":"string","description":"Trimmed and normalized to uppercase. Syntax only: 4 letters for persona_fisica or 3 for persona_moral (A–Z, Ñ, &), then YYMMDD (month 01–12, day 01–31) and 3 alphanumerics."},"address":{"$ref":"#/components/schemas/AddressWrite"}}},"FiscalProfile":{"type":"object","additionalProperties":false,"required":["id","taxpayer_type","registered_name","rfc","address"],"properties":{"id":{"type":"string","format":"uuid"},"taxpayer_type":{"type":"string","enum":["persona_fisica","persona_moral"],"description":"Persona física or Persona moral."},"registered_name":{"type":"string","minLength":1,"maxLength":255},"rfc":{"type":"string","description":"Trimmed and normalized to uppercase. Syntax only: 4 letters for persona_fisica or 3 for persona_moral (A–Z, Ñ, &), then YYMMDD (month 01–12, day 01–31) and 3 alphanumerics."},"address":{"$ref":"#/components/schemas/Address"}}},"MerchantWrite":{"type":"object","additionalProperties":false,"required":["commercial_name","business_activity","persona","fiscal_profile"],"properties":{"commercial_name":{"type":"string","minLength":1,"maxLength":255},"business_activity":{"$ref":"#/components/schemas/BusinessActivitySelection"},"persona":{"$ref":"#/components/schemas/PersonaWrite"},"fiscal_profile":{"$ref":"#/components/schemas/FiscalProfileWrite"}}},"Merchant":{"type":"object","additionalProperties":false,"required":["id","commercial_name","business_activity","persona","fiscal_profile"],"properties":{"id":{"type":"string","format":"uuid"},"commercial_name":{"type":"string","minLength":1,"maxLength":255},"business_activity":{"$ref":"#/components/schemas/BusinessActivity"},"persona":{"$ref":"#/components/schemas/Persona"},"fiscal_profile":{"$ref":"#/components/schemas/FiscalProfile"}}},"MerchantPage":{"type":"object","additionalProperties":false,"required":["items","limit","offset","has_more"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Merchant"}},"limit":{"type":"integer","minimum":1,"maximum":100},"offset":{"type":"integer","minimum":0},"has_more":{"type":"boolean"}}},"RfcCheckWrite":{"type":"object","additionalProperties":false,"required":["rfc"],"properties":{"rfc":{"type":"string","description":"Trimmed and normalized to uppercase. Syntax only: 4 letters for persona_fisica or 3 for persona_moral (A–Z, Ñ, &), then YYMMDD (month 01–12, day 01–31) and 3 alphanumerics."},"exclude_merchant_id":{"type":"string","format":"uuid"}}},"RfcCheck":{"type":"object","additionalProperties":false,"required":["match"],"properties":{"match":{"type":"boolean"}}},"Problem":{"type":"object","additionalProperties":false,"required":["type","title","status","detail","instance"],"properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}}}}}}