Create an appointment
Book one appointment in e-Oficlinic (ASIGNAR_CITAS) for a slot that search_booking_slots or list_booking_slots offered in an availability flow. Send what a person at the desk chooses: confirm true; the slot's flowId and slotId; the patient's documentType and documentNumber; the payer's planId and subplanId (list_payer_plans, list_payer_subplans); and in classification the patient's regime and affiliateType (list_regimes, list_affiliate_types) and, for copayments, salaryRange (list_salary_ranges). Leave the rest out: the service resolves it as the provider's own booking screen does. The payer, program and attention type are the flow's; the purpose is the form's default, 10; the contract is the payer's only active one, or none when it has none; billing takes its flags from the payer's row, its copayment rate, cap and moderator fee from the salary range's row, and its tariff from the payer's tariff matrix for the flow's service under the plan and subplan. A value the caller does send is used as given, and a billing object is sent unchanged with nothing resolved. BOOKING_VALUE_UNRESOLVED means a needed value could not be resolved from the provider's own data and nothing was written; send it and repeat: contractId when the payer has several active contracts; classification.relationship when the affiliate type is neither C nor N; classification.listStatus when the payer uses an attention list; a classification.salaryRange the regime lists; or billing when the payer's tariff grid has no positive tariff for the service. Before anything is written, the patient is resolved by citizenship card; the source must still count exactly one unit for the program and attention type; the regime, affiliate type, relationship and salary range, and the payer, plan, subplan and contract, must be listed by the provider; the service must be configured for the slot's professional; and a fresh read must still show the slot. The intent and a fence on the slot are recorded before the single provider request, which is never resent. Success means the provider answered a strictly positive appointment number, the source's own creation signal (verification provider_acknowledgement). OUTCOME_UNKNOWN means the appointment may exist: do not book again; check lookup_appointments with status assigned and ask staff. WRITE_TARGET_UNRESOLVED means another key's write to this slot has no final outcome, so nothing was sent. WRITE_LEDGER_FULL means the connection's ledger refused a new write and nothing was sent. Repeating the identical request answers the recorded outcome; no idempotency key is needed. One-slot, one-unit bookings only. agentMode true answers concise Spanish text instead.
- Scope:
oficlinic:appointments:write - Credentials: an API key, a client-credentials token or a person's access token
- Effect: writes; not idempotent: check the outcome before you retry
- Limits: request body up to 8 KB, response up to 64 KB
- CLI:
arbol oficlinic appointments create· MCP tool:oficlinic_appointments_create
https://api.getarbol.com/v1/oficlinic/appointmentsAuthorization
Request body JSON required
- idempotencyKeyoptionalstring
Optional. Without it the service derives the key from the request itself, so repeating the identical request answers the recorded outcome and never writes again. A caller that retries with changed values can choose one key per intended write, such as a UUID; another request with it answers IDEMPOTENCY_KEY_REUSED.
maxLength: 64 · minLength: 8 · pattern: ^[A-Za-z0-9_-]+$ - contractIdoptionalstring | null
A contract of the payer from list_payer_contracts, which must not be inactive. An explicit null sends none. Leaving the key out is not the same as null: the service then sends the payer's only contract when list_payer_contracts has exactly one that is not inactive and marks it active, sends none when the payer has no contract or only inactive ones, and answers BOOKING_VALUE_UNRESOLVED otherwise (several contracts, or an unrecognized active flag).
pattern: ^[0-9A-Za-z._-]{1,32}$ - billingoptionalobject
Billing values of the booking screen. Leave the whole object out and the service resolves them as the screen does: tariff from the payer's tariff matrix for the flow's service under the plan and subplan; billPrivately, billCopayments and enteredCopayment from the payer's row; copaymentPercentage, maxCopayment and indicatedModeratorFee from the row of classification.salaryRange; exempt 0, courtOrder 0 and markExempt false. When given, every value is sent exactly as given and nothing is resolved.
Returns
201
Successful operation.
400
INVALID_INPUT: The request does not match the published schema.
401
UNAUTHORIZED: A valid access token is required.
403
FORBIDDEN: The token does not authorize this operation.
404
CONNECTION_NOT_FOUND: The connection does not exist in this organization.PATIENT_NOT_FOUND: The provider explicitly reported no patient with the document.PAYER_NOT_FOUND: The payer is not configured for the connection's company and IPS.PAYER_OPTION_NOT_FOUND: The plan, subplan or contract is not one the provider lists for the payer, or the contract is inactive.BOOKING_OPTION_NOT_FOUND: The program, attention type, regime, affiliate type, relationship or cancellation reason is not one the provider lists.
409
CONNECTION_REQUIRED: The organization has several active connections: select one.CONNECTION_NOT_ACTIVE: The connection is not active.CONNECTION_BUSY: Another operation is using this connection or signing in for the organization.REAUTHENTICATION_REQUIRED: Provider sign-in is stopped for this connection. Verify the connection again.SERVICE_NOT_AVAILABLE: The service is not configured for the selected professional.SELECTION_NOT_AVAILABLE: The professional, room, day or slot is not offered in this availability flow, or is no longer offered.IDEMPOTENCY_KEY_REUSED: The idempotency key was already used for a different request.WRITE_TARGET_UNRESOLVED: An earlier write to this slot or appointment has no final outcome, so no other write to it is sent. Staff must check the provider's appointments.
410
SELECTION_EXPIRED: The availability flow expired or does not exist. List booking professionals again.
413
REQUEST_TOO_LARGE: The request exceeds the allowed size.
415
UNSUPPORTED_MEDIA_TYPE: The request content type is not supported.
422
CREDENTIALS_REJECTED: The organization's connection to this integration couldn't complete the request. Don't retry it automatically; if it keeps happening, contact your Arbol team.CONTEXT_NOT_AVAILABLE: The selected company, site or IPS is not available to the provider account.PROVIDER_IDENTITY_MISMATCH: The provider session does not belong to the connection's user and selected context.BOOKING_VALUE_UNRESOLVED: A value the booking needs could not be resolved from the provider's own data, so the caller must supply it: a contract, a relationship, a list status, an authorization number, a salary range the regime lists, or the billing values. Nothing was written.PROGRAM_UNITS_NOT_SUPPORTED: The attention type's source unit count is not exactly one, and this service books one-unit programs only.
429
RATE_LIMITED: The request rate limit was exceeded. Try again later.LOGIN_COOLING_DOWN: The organization's connection to this integration couldn't complete the request. Don't retry it automatically; if it keeps happening, contact your Arbol team.
500
INTERNAL_ERROR: The service could not complete the operation.
502
OUTCOME_UNKNOWN: The operation may have been applied; check its result before repeating it.SIGN_IN_OUTCOME_UNKNOWN: The provider did not confirm a sign-in. It is not repeated automatically.PROVIDER_PROTOCOL_CHANGED: The provider returned an unrecognized response.PATIENT_RECORD_MISMATCH: The provider answered a record that does not match the request.
503
UPSTREAM_UNAVAILABLE: The upstream service could not complete the request.PROVIDER_UNAVAILABLE: The provider could not complete the request.WRITE_LEDGER_FULL: The connection's write ledger is at capacity, so no new write was sent. Recorded writes stay answerable; staff must look.