curl https://api.onepay.la/v1/companies \
-X POST \
-H "Authorization: Bearer sk_test_xxx" \
-H "Content-Type: application/json" \
-H "x-idempotency: company-001" \
-d '{
"type": "organization",
"name": "Acme Inc",
"legal_name": "Acme Inc S.A.S",
"document_type": "NIT",
"document_number": "123456789-1",
"phone": "+573001234567",
"email": "contacto@acme.co",
"website": "https://acme.co",
"economic_activity": "0111",
"industry": "0742",
"sales": 35,
"fiscal_responsibilities": ["O_47"],
"retention_rules": {
"iva": true,
"ica": false,
"fuente": true
},
"city_id": 1,
"address": {
"address": "Calle 100 #15-20",
"hint": "Oficina 301",
"zipcode": "170004"
},
"documents": {
"rut": "https://storage.example.com/rut.pdf",
"ccc": "https://storage.example.com/ccc.pdf",
"dni": "https://storage.example.com/dni.pdf",
"bank": "https://storage.example.com/bank.pdf",
"simple": "https://storage.example.com/simple.pdf"
},
"company_owner": {
"name": "Juan",
"last_name": "Pérez",
"phone": "+573001234568",
"email": "juan@acme.co",
"document_type": "cc",
"dni": "10000001"
},
"account": {
"type": "savings",
"bank_id": "9da58912-101d-46f8-86c9-20a52119c0bf",
"number": "1234567890",
"terms": true
}
}'
{
"id": "9da58912-101d-46f8-86c9-20a52119c0bf",
"name": "Acme Inc",
"legal_name": "Acme Inc S.A.S",
"phone": "+573001234567",
"document_type": "NIT",
"document_number": "123456789-1",
"status": "pending",
"industry": "0742",
"currency": "COP"
}
Crea una nueva empresa asociada a tu cuenta. Los usuarios con permiso switch_company serán vinculados automáticamente como miembros.
curl https://api.onepay.la/v1/companies \
-X POST \
-H "Authorization: Bearer sk_test_xxx" \
-H "Content-Type: application/json" \
-H "x-idempotency: company-001" \
-d '{
"type": "organization",
"name": "Acme Inc",
"legal_name": "Acme Inc S.A.S",
"document_type": "NIT",
"document_number": "123456789-1",
"phone": "+573001234567",
"email": "contacto@acme.co",
"website": "https://acme.co",
"economic_activity": "0111",
"industry": "0742",
"sales": 35,
"fiscal_responsibilities": ["O_47"],
"retention_rules": {
"iva": true,
"ica": false,
"fuente": true
},
"city_id": 1,
"address": {
"address": "Calle 100 #15-20",
"hint": "Oficina 301",
"zipcode": "170004"
},
"documents": {
"rut": "https://storage.example.com/rut.pdf",
"ccc": "https://storage.example.com/ccc.pdf",
"dni": "https://storage.example.com/dni.pdf",
"bank": "https://storage.example.com/bank.pdf",
"simple": "https://storage.example.com/simple.pdf"
},
"company_owner": {
"name": "Juan",
"last_name": "Pérez",
"phone": "+573001234568",
"email": "juan@acme.co",
"document_type": "cc",
"dni": "10000001"
},
"account": {
"type": "savings",
"bank_id": "9da58912-101d-46f8-86c9-20a52119c0bf",
"number": "1234567890",
"terms": true
}
}'
{
"id": "9da58912-101d-46f8-86c9-20a52119c0bf",
"name": "Acme Inc",
"legal_name": "Acme Inc S.A.S",
"phone": "+573001234567",
"document_type": "NIT",
"document_number": "123456789-1",
"status": "pending",
"industry": "0742",
"currency": "COP"
}
organization (persona jurídica), individual (persona natural).organization: NIT, RUT. Para individual: CC, CE, PPT, PEP, PASSPORT.+573001234567).10, 35, 110, 240, 500.["O_47", "R_99_PN"]).Show Propiedades
type es organization.type es organization.O_47 está en fiscal_responsibilities.type es organization.Show Propiedades
cc o ce.Show Propiedades
SAVINGS (ahorros) o CHECKING (corriente).switch_company serán vinculados automáticamente como miembros de la nueva empresa.pending.COP).{
"id": "9da58912-101d-46f8-86c9-20a52119c0bf",
"name": "Acme Inc",
"legal_name": "Acme Inc S.A.S",
"phone": "+573001234567",
"document_type": "NIT",
"document_number": "123456789-1",
"status": "pending",
"industry": "0742",
"currency": "COP"
}
curl https://api.onepay.la/v1/companies \
-X POST \
-H "Authorization: Bearer sk_test_xxx" \
-H "Content-Type: application/json" \
-H "x-idempotency: company-001" \
-d '{
"type": "organization",
"name": "Acme Inc",
"legal_name": "Acme Inc S.A.S",
"document_type": "NIT",
"document_number": "123456789-1",
"phone": "+573001234567",
"email": "contacto@acme.co",
"website": "https://acme.co",
"economic_activity": "0111",
"industry": "0742",
"sales": 35,
"fiscal_responsibilities": ["O_47"],
"retention_rules": {
"iva": true,
"ica": false,
"fuente": true
},
"city_id": 1,
"address": {
"address": "Calle 100 #15-20",
"hint": "Oficina 301",
"zipcode": "170004"
},
"documents": {
"rut": "https://storage.example.com/rut.pdf",
"ccc": "https://storage.example.com/ccc.pdf",
"dni": "https://storage.example.com/dni.pdf",
"bank": "https://storage.example.com/bank.pdf",
"simple": "https://storage.example.com/simple.pdf"
},
"company_owner": {
"name": "Juan",
"last_name": "Pérez",
"phone": "+573001234568",
"email": "juan@acme.co",
"document_type": "cc",
"dni": "10000001"
},
"account": {
"type": "savings",
"bank_id": "9da58912-101d-46f8-86c9-20a52119c0bf",
"number": "1234567890",
"terms": true
}
}'
Was this page helpful?