Booking


Se trata de una propuesta de contrato de talentos.

Los campos attachments, shortlist y talents sólo son devueltos por el método Mostrar (detalles), Crear y Actualizar.

Los attachments son los archivos adjuntos. Tiene un límite de 5.

Los shortlist son los Talents solicitados. Se trata de la lista completa de Talents desde el principio, aún cuando hayan confirmado (o no) la propuesta.

Los talents son los Talents ya confirmados para el trabajo. Así mismo, se pueden identificar con el status = Confirmed desde el shortlist

  • status = confirmed desde el shortlist

Booking status:

  • 1000 Draft: Booking en borrador. No ha sido enviado. Se puede modificar sin restricciones.
  • 2000 Requested: Booking enviado al Admin. Ya no es posible modificarlo, pero si cancelarlo.
  • 2090 RequestRefused: El Admin ha rechazado la propuesta de Booking.
  • 2100 OfferReceived: El Admin ha modificado la oferta de Booking y espera confirmación.
  • 2190 OfferRejected: El Booker ha rechazado la oferta del Admin.
  • 3000 Confirmed: Propuesta de Booking aceptada.
  • 3090 TalentUnavailable: No hay Talents disponibles para realizar el Booking y ha sido cancelado.
  • 4000 Upcoming: Propuesta de Booking Confirmada por los Talents.
  • 4090 Canceled: Booking cancelado después de confirmado.
  • 4100 TakingPlace: Booking en progreso.
  • 5000 Completed: Booking finalizado. Ya no es posible cancelarlo.
  • 5100 PaymentPending: Factura generada. Se espera confirmación de pago.
  • 8000 Paid: Pago confirmado. Se espera liquidar a los Talents.
  • 9000 Fulfilled: Todos los Talents han sido pagados. El Booking ha finalizado.

Modelo Booking

{
    "id": 1,
    "booker_id": 1,
    "status": "Draft",
    "talents_required": 1,
    "rate_per_model_cents": 6794,
    "hours_per_day": 3,
    "agency_fee_prc": 0.2,
    "vat_prc": 0.2,
    "booker_name": "Raymond Goodwin",
    "job_type": "Editorial",
    "job_name": "Extruding Machine Operator",
    "who_is_it_for": "provident adipisci voluptatum qui nobis animi et voluptas",
    "location": "Torpmouth, Guinea",
    "date": "2022-12-18T19:10:53.000000Z",
    "job_description": "Voluptas nam laboriosam est eum consectetur et non. Ullam reiciendis tempore aliquam velit maiores beatae at.",
    "usage": "dicta tempora facilis rerum qui numquam optio et blanditiis qui consequatur voluptate in id rem",
    "created_at": "2022-11-22T03:33:11.000000Z",
    "updated_at": "2022-11-27T04:16:21.000000Z",
    "deleted_at": null,
    "location_url": null,
    "total": {
        "currency_iso": "GBP",
        "currency_symbol": "£",
        "amount_cents": 9784,
        "amount": "97.84",
        "formatted": "£97.84",
        "formatted_iso": "97.84 GBP"
    }
}

Insertar Booking

Crea un Booking en borrador (No ha sido enviado).

Se puede modificar sin restricciones.

URI Cabeceras
POST /bookings Auth

Carga útil

{
    "booker_id": 1,
    "talents_required": 1,
    "rate_per_model_cents": 6794,
    "hours_per_day": 3,
    "booker_name": "Raymond Goodwin",
    "job_type": "Editorial",
    "job_name": "Extruding Machine Operator",
    "who_is_it_for": "provident adipisci voluptatum qui nobis animi et voluptas",
    "location": "Torpmouth, Guinea",
    "date": "2022-12-18T19:10:53.000000Z",
    "job_description": "Voluptas nam laboriosam est eum consectetur et non. Ullam reiciendis tempore aliquam velit maiores beatae at.",
    "usage": "dicta tempora facilis rerum qui numquam optio et blanditiis qui consequatur voluptate in id rem",
    "location_url": null,
    "attachments": [
        "{file}"
    ],
    "shortlist": [
        1111,
        2222,
        3333
    ]
}

Atributos

  • booker_id integer obligatorio bookers's id exists
  • talents_required integer obligatorio min: 1
  • rate_per_model_cents integer obligatorio min: 1
  • hours_per_day integer obligatorio min: 1 max: 24
  • booker_name string obligatorio max: 255
  • job_type string obligatorio "Ecom" "Campaign" "Commercial" "Lookbook" "Editorial" "MusicVideo" "TestShoot" "Casting" "Fitting" "Digital" choice
  • job_name string obligatorio max: 255
  • who_is_it_for string obligatorio max: 255
  • location string obligatorio max: 255
  • location_url string opcional nullable url max: 1024
  • date string obligatorio date greater than now
  • job_description string obligatorio max: 8192
  • usage string obligatorio max: 1024
  • attachments array opcional nullable max: 5
    • * file obligatorio "pdf"
  • shortlist array obligatorio min: 1
    • * integer obligatorio distinct values talents's id exists

Listar Booking

URI Cabeceras
GET /bookings Auth

Atributos

  • per_page integer opcional min: 1 max: 60
  • page integer opcional min: 1
  • sort_by string opcional max: 80
  • booking_status string opcional "Requested" "Confirmed" "Completed" "Paid" "Rejected" choice
  • date_from string opcional date
  • date_to string opcional date

Listar Booking de Booker

URI Cabeceras
GET /bookers/{booker}/bookings Auth

Atributos

  • per_page integer opcional min: 1 max: 60
  • page integer opcional min: 1
  • sort_by string opcional max: 80
  • booking_status string opcional "Draft" "Requested" "Confirmed" "Completed" "Rejected" choice
  • date_from string opcional date
  • date_to string opcional date

Listar Booking de Talent

Lista los Bookings de un Talent.

URI Cabeceras
GET /talents/{talent}/bookings Auth

Atributos

  • per_page integer opcional min: 1 max: 60
  • page integer opcional min: 1
  • sort_by string opcional max: 80
  • talent_status string opcional "Shortlisted" "Confirmed" "Completed" "Rejected" choice
  • date_from string opcional date
  • date_to string opcional date

Mostrar Booking

URI Cabeceras
GET /bookings/{booking} Auth

Actualizar Booking

Modifica los datos de un Booking. Solo es permitido si el status del Booking es Draft

URI Cabeceras
PATCH /bookings/{booking} Auth

Carga útil

{
    "talents_required": 1,
    "rate_per_model_cents": 6794,
    "hours_per_day": 3,
    "booker_name": "Raymond Goodwin",
    "job_type": "Editorial",
    "job_name": "Extruding Machine Operator",
    "who_is_it_for": "provident adipisci voluptatum qui nobis animi et voluptas",
    "location": "Torpmouth, Guinea",
    "date": "2022-12-18T19:10:53.000000Z",
    "job_description": "Voluptas nam laboriosam est eum consectetur et non. Ullam reiciendis tempore aliquam velit maiores beatae at.",
    "usage": "dicta tempora facilis rerum qui numquam optio et blanditiis qui consequatur voluptate in id rem",
    "location_url": null,
    "shortlist": [
        1111,
        2222,
        3333
    ]
}

Atributos

  • talents_required integer opcional nullable min: 1
  • rate_per_model_cents integer opcional nullable min: 1
  • hours_per_day integer opcional nullable min: 1 max: 24
  • booker_name string opcional nullable max: 255
  • job_type string opcional nullable "Ecom" "Campaign" "Commercial" "Lookbook" "Editorial" "MusicVideo" "TestShoot" "Casting" "Fitting" "Digital" choice
  • job_name string opcional nullable max: 255
  • who_is_it_for string opcional nullable max: 255
  • location string opcional nullable max: 255
  • location_url string opcional nullable url max: 1024
  • date string opcional nullable date greater than now
  • job_description string opcional nullable max: 8192
  • usage string opcional nullable max: 1024
  • shortlist array opcional nullable min: 1
    • * integer obligatorio distinct values talents's id exists

Eliminar Booking

URI Cabeceras
DELETE /bookings/{booking} Auth

Restaurar Booking

URI Cabeceras
POST /bookings/{bookingId}/restore Auth

Acciones de Booking

Calculate Fees

Calcula los taxes de un booking que no ha sido creado.

URI Cabeceras
GET /bookings/calculate-fees Guest

Carga útil

{
    "talents_required": 1,
    "rate_per_model_cents": 6794
}

Atributos

  • talents_required integer obligatorio min: 1
  • rate_per_model_cents integer obligatorio min: 1

Respuesta (Ejemplo)

{
    "talents_required": 4,
    "rate_per_model_cents": 1200,
    "models_fee": {
        "currency_iso": "GBP",
        "currency_symbol": "£",
        "amount_cents": 4800,
        "amount": "48.00",
        "formatted": "£48.00",
        "formatted_iso": "48.00 GBP"
    },
    "agency_fee": {
        "currency_iso": "GBP",
        "currency_symbol": "£",
        "amount_cents": 960,
        "amount": "9.60",
        "formatted": "£9.60",
        "formatted_iso": "9.60 GBP"
    },
    "vat": {
        "currency_iso": "GBP",
        "currency_symbol": "£",
        "amount_cents": 1152,
        "amount": "11.52",
        "formatted": "£11.52",
        "formatted_iso": "11.52 GBP"
    },
    "total": {
        "currency_iso": "GBP",
        "currency_symbol": "£",
        "amount_cents": 6912,
        "amount": "69.12",
        "formatted": "£69.12",
        "formatted_iso": "69.12 GBP"
    },
    "agency_fee_prc_text": "20%",
    "vat_prc_text": "20%"
}

All Shortlist

URI Cabeceras
GET /bookings/{booking}/shortlist Auth

All Talents

URI Cabeceras
GET /bookings/{booking}/talents Auth

Send Request

Envía la propuesta de Booking al Administrador.

URI Cabeceras
POST /bookings/{booking}/send-request Auth

Respuesta (Ejemplo)

{
    "[collapsed]": "...",
    "status": "Requested"
}

Error BK01

{
    "error_code": "BK01",
    "details": "This action requires a booking status: Draft.",
    "parameters": {
        "status": "Fulfilled",
        "allowed": "Draft"
    }
}

Error ER140

{
    "error_code": "ER140",
    "details": "Concurrency error. The resource was updated while processing the request",
    "parameters": null
}

Accept Request

Acepta la propuesta de Booking.

URI Cabeceras
POST /bookings/{booking}/accept-request Auth

Respuesta (Ejemplo)

{
    "[collapsed]": "...",
    "status": "Shortlisted"
}

Error BK01

{
    "error_code": "BK01",
    "details": "This action requires a booking status: Requested.",
    "parameters": {
        "status": "Fulfilled",
        "allowed": "Requested"
    }
}

Error ER140

{
    "error_code": "ER140",
    "details": "Concurrency error. The resource was updated while processing the request",
    "parameters": null
}

Send Offer

Modifica el Booking y envía una oferta de precio nueva. Se espera confirmación del Booker.

URI Cabeceras
POST /bookings/{booking}/send-offer Auth

Carga útil

{
    "rate_per_model_cents": 6794
}

Atributos

  • rate_per_model_cents integer obligatorio min: 1

Respuesta (Ejemplo)

{
    "[collapsed]": "...",
    "status": "OfferReceived"
}

Error BK01

{
    "error_code": "BK01",
    "details": "This action requires a booking status: Requested.",
    "parameters": {
        "status": "Fulfilled",
        "allowed": "Requested"
    }
}

Error BK04

{
    "error_code": "BK04",
    "details": "The talents_required can not be higher than shortlist count (2 <= 1).",
    "parameters": {
        "talentsRequired": 2,
        "shortlistCount": 1
    }
}

Error ER140

{
    "error_code": "ER140",
    "details": "Concurrency error. The resource was updated while processing the request",
    "parameters": null
}

Accept Offer

Acepta la oferta de Booking.

URI Cabeceras
POST /bookings/{booking}/accept-offer Auth

Respuesta (Ejemplo)

{
    "[collapsed]": "...",
    "status": "Shortlisted"
}

Error BK01

{
    "error_code": "BK01",
    "details": "This action requires a booking status: OfferReceived.",
    "parameters": {
        "status": "Requested",
        "allowed": "OfferReceived"
    }
}

Error ER140

{
    "error_code": "ER140",
    "details": "Concurrency error. The resource was updated while processing the request",
    "parameters": null
}

Refuse Offer

Rechaza la oferta de Booking. El booking es terminado.

URI Cabeceras
POST /bookings/{booking}/refuse-offer Auth

Respuesta (Ejemplo)

{
    "[collapsed]": "...",
    "status": "RequestRefused"
}

Error BK01

{
    "error_code": "BK01",
    "details": "This action requires a booking status: OfferReceived.",
    "parameters": {
        "status": "Requested",
        "allowed": "OfferReceived"
    }
}

Error ER140

{
    "error_code": "ER140",
    "details": "Concurrency error. The resource was updated while processing the request",
    "parameters": null
}

Refuse

Rechaza el Booking. Permitido solo para Administradores.

URI Cabeceras
POST /bookings/{booking}/refuse Auth

Respuesta (Ejemplo)

{
    "[collapsed]": "...",
    "status": "RequestRefused"
}

Error BK01

{
    "error_code": "BK01",
    "details": "This action requires a booking status: Requested,OfferReceived,OfferRejected,Shortlisted,Upcoming,TakingPlace.",
    "parameters": {
        "status": "Fulfilled",
        "allowed": "Requested,OfferReceived,OfferRejected,Shortlisted,Upcoming,TakingPlace"
    }
}

Error ER140

{
    "error_code": "ER140",
    "details": "Concurrency error. The resource was updated while processing the request",
    "parameters": null
}

Mark Paid

Confirma la recepción del pago.

URI Cabeceras
POST /bookings/{booking}/mark-paid Auth

Respuesta (Ejemplo)

{
    "[collapsed]": "...",
    "status": "Paid"
}

Error BK01

{
    "error_code": "BK01",
    "details": "This action requires a booking status: PaymentPending.",
    "parameters": {
        "status": "Requested",
        "allowed": "PaymentPending"
    }
}

Error ER140

{
    "error_code": "ER140",
    "details": "Concurrency error. The resource was updated while processing the request",
    "parameters": null
}

Ask Confirmation

Consulta al Talent que confirme si desea participar (o no) en el Booking.

URI Cabeceras
POST /booking-shortlists/{bookingShortlistId}/ask-confirmation Auth

Error ER140

{
    "error_code": "ER140",
    "details": "Concurrency error. The resource was updated while processing the request",
    "parameters": null
}

Ask Talent Confirmation

URI Cabeceras
POST /bookings/{booking}/talents/{talent}/ask-confirmation Auth

Confirm

El Admin confirma un Talent que haya aceptado.

El endpoint puede ser usado por un Talent para confirmar la participación, equivalente a "accept".

URI Cabeceras
POST /booking-shortlists/{bookingShortlistId}/confirm Auth

Error ER140

{
    "error_code": "ER140",
    "details": "Concurrency error. The resource was updated while processing the request",
    "parameters": null
}

Confirm Talent

URI Cabeceras
POST /bookings/{booking}/talents/{talent}/confirm Auth

Accept

El Talent acepta el Booking.

URI Cabeceras
POST /booking-shortlists/{bookingShortlistId}/accept Auth

Error ER140

{
    "error_code": "ER140",
    "details": "Concurrency error. The resource was updated while processing the request",
    "parameters": null
}

Accept Talent

URI Cabeceras
POST /bookings/{booking}/talents/{talent}/accept Auth

Refuse

El Talent rechaza el Booking.

URI Cabeceras
POST /booking-shortlists/{bookingShortlistId}/refuse Auth

Respuesta (Ejemplo)

{
    "[collapsed]": "...",
    "status": "RequestRefused"
}

Error BK01

{
    "error_code": "BK01",
    "details": "This action requires a booking status: Requested,OfferReceived,OfferRejected,Shortlisted,Upcoming,TakingPlace.",
    "parameters": {
        "status": "Fulfilled",
        "allowed": "Requested,OfferReceived,OfferRejected,Shortlisted,Upcoming,TakingPlace"
    }
}

Error ER140

{
    "error_code": "ER140",
    "details": "Concurrency error. The resource was updated while processing the request",
    "parameters": null
}

Refuse Talent

URI Cabeceras
POST /bookings/{booking}/talents/{talent}/refuse Auth

Mark Paid

URI Cabeceras
POST /booking-talents/{bookingTalentId}/mark-paid Auth

Respuesta (Ejemplo)

{
    "[collapsed]": "...",
    "status": "Paid"
}

Error BK01

{
    "error_code": "BK01",
    "details": "This action requires a booking status: PaymentPending.",
    "parameters": {
        "status": "Requested",
        "allowed": "PaymentPending"
    }
}

Error ER140

{
    "error_code": "ER140",
    "details": "Concurrency error. The resource was updated while processing the request",
    "parameters": null
}

Mark Talent Paid

URI Cabeceras
POST /bookings/{booking}/talents/{talent}/mark-paid Auth

Enlaces de Booking