# Submit a signature instruction to a device, then retrieve the captured signature.

Submit a signature instruction to a device, then retrieve the captured signature.

1. Submit an instruction to capture a signature on the device identified by `serialNumber` in the path; the target terminal is sent as `processingTerminalId` in the body. Requires a UUID v4 Idempotency-Key header. The gateway returns 202 with a `signatureInstructionId` and an initial `status` of `inProgress`; the device then prompts the customer to sign.
 [sendSignatureInstruction](/api/send-signature-instruction)
2. Retrieve the signature instruction by its `signatureInstructionId`. Poll this step until `status` is `completed` (it stays `inProgress` while the customer is signing; `failure` or `canceled` means no signature). The completed response includes a `link` whose `href` ends with the `signatureId` needed for the next step. The signature itself is produced by the customer on the device between submit and this poll.
 [getSignatureInstruction](/api/get-signature-instruction)
3. Retrieve the captured signature by its `signatureId` (the final path segment of the `signatureLink` from the previous step). Returns 200 with the Base64-encoded image in `signature`, its `contentType` (for example image/png), and the `createdOn` capture date, linked to the `processingTerminalId`.
 [retrieveSignature](/api/retrieve-signature)

## Workflow diagram

```mermaid
flowchart TD
  step0["1. signature instruction · API"]
  step1["2. instruction status poll · API"]
  step0 --> step1
  step2["3. signature retrieval · API"]
  step1 --> step2
```
