action square_retrieve_customer_segment { label: "RetrieveCustomerSegment" description: "Retrieves a specific customer segment as identified by the `segment_id` value." provider: square method: GET path: "/v2/customers/segments/{segment_id}" encoding: json input: { type: "object" properties: { segment_id: { type: "string" } } required: ["segment_id"] additionalProperties: false } output: { type: "object" description: "Defines the fields that are included in the response body for requests to the `RetrieveCustomerSegment` endpoint.\n\nEither `errors` or `segment` is present in a given response (never both)." properties: { errors: { type: "array" description: "Any errors that occurred during the request." items: { type: "object" description: "Represents an error encountered during a request to the Connect API.\n\nSee [Handling errors](https://developer.squareup.com/docs/build-basics/handling-errors) for more information." required: ["category", "code"] properties: { category: { type: "string" description: "The high-level category for the error." } code: { type: "string" description: "The specific code of the error." } detail: { type: "string" description: "A human-readable description of the error for debugging purposes." } field: { type: "string" description: "The name of the field provided in the original request (if any) that\nthe error pertains to." } } } } segment: { type: "object" description: "Represents a group of customer profiles that match one or more predefined filter criteria. \n\nSegments (also known as Smart Groups) are defined and created within the Customer Directory in the\nSquare Seller Dashboard or Point of Sale." required: ["name"] properties: { created_at: { type: "string" description: "The timestamp when the segment was created, in RFC 3339 format." } id: { type: "string" description: "A unique Square-generated ID for the segment." } name: { type: "string" description: "The name of the segment." } updated_at: { type: "string" description: "The timestamp when the segment was last updated, in RFC 3339 format." } } } } } }