Skip to main content

Submit Survey Response

Submit a response to a survey on behalf of a customer.

Endpointโ€‹

POST /v1/surveys/{id}/responses

Path Parametersโ€‹

ParameterTypeDescription
idintegerSurvey ID

Authenticationโ€‹

Requires an API key with the surveys:write scope.

Request Bodyโ€‹

FieldTypeRequiredDescription
booking_idintegerNoLink response to a booking
customer_idintegerNoLink response to a customer
staff_idintegerNoStaff member who collected the response
responsesarrayYesArray of field responses
responses[].field_idintegerYesThe survey field ID
responses[].valuemixedYesThe response value
send_confirmation_emailbooleanNoSend confirmation emails (default: false)
signer_namesobjectNoThe name typed beside each signature, keyed by field ID. Stored only for a signature (or initials) field on this survey that is set to ask for one, and only when it was actually signed; signed_at is stamped by EquipDash. See Submit Waiver Response.

Field Value Typesโ€‹

Different field types expect different value formats:

Field TypeValue FormatExample
npsRatinginteger (0-10)9
starRatinginteger (1-5)4
csatinteger (1-5)5
cesinteger (1-7)6
likertScaleinteger (1-5)4
shortText, longTextstring"Great experience!"
singleChoicestring"Friend referral"
multipleChoicearray of strings["Option A", "Option C"]

Example Requestโ€‹

curl -X POST "https://app.equipdash.com/api/v1/surveys/1/responses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"booking_id": 123,
"customer_id": 456,
"responses": [
{
"field_id": 10,
"value": 9
},
{
"field_id": 11,
"value": 5
},
{
"field_id": 12,
"value": "Friend referral"
},
{
"field_id": 13,
"value": "Excellent service! The staff was very helpful and the equipment was in perfect condition."
}
],
"send_confirmation_email": true
}'

Responseโ€‹

Success (201 Created)โ€‹

{
"data": {
"id": 42,
"waiver_form_id": 1,
"booking_id": 123,
"customer_id": 456,
"staff_id": null,
"submission_date": "2026-02-01T10:00:00+00:00",
"waiver": {
"id": 1,
"name": "Customer Satisfaction Survey",
"type": "survey"
},
"customer": {
"id": 456,
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com"
},
"booking": {
"id": 123,
"status": "confirmed"
},
"responses": [
{
"field_id": 10,
"field_label": "How likely are you to recommend us?",
"field_type": "npsRating",
"value": "9"
},
{
"field_id": 11,
"field_label": "Rate our equipment quality",
"field_type": "starRating",
"value": "5"
},
{
"field_id": 12,
"field_label": "How did you hear about us?",
"field_type": "singleChoice",
"value": "Friend referral"
},
{
"field_id": 13,
"field_label": "Additional comments",
"field_type": "longText",
"value": "Excellent service! The staff was very helpful and the equipment was in perfect condition."
}
],
"nps_score": 9,
"nps_category": "promoter",
"created_at": "2026-02-01T10:00:00+00:00"
},
"meta": {
"request_id": "req_abc123",
"timestamp": "2026-02-01T10:00:00+00:00"
}
}

NPS Dataโ€‹

When a survey contains an NPS rating field, the response includes:

FieldTypeDescription
nps_scoreintegerThe NPS rating (0-10)
nps_categorystringpromoter, passive, or detractor

NPS Categories:

  • Promoter (9-10): Loyal enthusiasts
  • Passive (7-8): Satisfied but unenthusiastic
  • Detractor (0-6): Unhappy customers

Error Responsesโ€‹

Survey Not Publishedโ€‹

{
"error": {
"code": "validation_error",
"message": "The given data was invalid.",
"details": [
{
"field": "survey",
"message": "This survey is not accepting responses."
}
]
}
}

Missing Required Fieldsโ€‹

{
"error": {
"code": "validation_error",
"message": "The given data was invalid.",
"details": [
{
"field": "responses",
"message": "Missing required fields: How likely are you to recommend us?"
}
]
}
}

Invalid Customer/Bookingโ€‹

{
"error": {
"code": "validation_error",
"message": "The given data was invalid.",
"details": [
{
"field": "customer_id",
"message": "Customer not found."
}
]
}
}

Errorsโ€‹

StatusCodeDescription
401authentication_requiredNo API key provided
401invalid_api_keyInvalid API key
403insufficient_scopeAPI key lacks surveys:write scope
403forbiddenSurvey belongs to another supplier
404not_foundSurvey not found
422validation_errorInvalid request data

Notesโ€‹

  • The survey must be in published status to accept responses
  • At least one response is required in the responses array
  • Only fields belonging to the survey are processed
  • For NPS fields, the score and category are automatically calculated
  • Confirmation emails can be sent to admins and customers when enabled