> For the complete documentation index, see [llms.txt](https://help.runonrufus.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.runonrufus.com/public-api/specifications/passings.md).

# Passings

## Insert passings

> Requires \`WRITE\` or \`READ\_WRITE\` api key access type.

```json
{"openapi":"3.0.3","info":{"title":"RUFUS Public REST API","version":"0.1.0"},"tags":[{"name":"Passings"}],"servers":[{"url":"https://api.runonrufus.com/v0","description":"Production (v0)"}],"security":[{"ApiKeyHeader":[]},{"XApiKeyHeader":[]}],"components":{"securitySchemes":{"ApiKeyHeader":{"type":"apiKey","in":"header","name":"api_key","description":"API key for authentication."},"XApiKeyHeader":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key for authentication (alternate header)."}},"schemas":{"InsertPassingsRequest":{"type":"object","additionalProperties":false,"properties":{"token_session":{"type":"string"},"passings_list":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/Passing"}}},"required":["token_session","passings_list"]},"Passing":{"type":"object","additionalProperties":false,"properties":{"timestamp":{"type":"string","format":"date-time"},"num_passing":{"type":"integer","minimum":0},"bib":{"type":"string"},"participant_id":{"type":"string","nullable":true},"chip":{"type":"string","nullable":true},"latitude":{"type":"number","nullable":true},"longitude":{"type":"number","nullable":true},"status":{"type":"string","nullable":true},"timezone":{"type":"string","nullable":true},"gender":{"type":"string","nullable":true}},"required":["timestamp","num_passing","bib"]},"InsertPassingsResponse":{"type":"object","additionalProperties":false,"properties":{"body":{"type":"object","additionalProperties":false,"properties":{"description":{"type":"string"},"token_session":{"type":"string"},"inserted_count":{"type":"integer","minimum":0},"duplicate_count":{"type":"integer","minimum":0}},"required":["description","token_session"]}},"required":["body"]},"EnvelopeAny":{"type":"object","additionalProperties":false,"properties":{"body":{"description":"Operation result body."}}},"EnvelopeNull":{"type":"object","additionalProperties":false,"properties":{"body":{"nullable":true}},"required":["body"]}},"responses":{"BadRequest":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvelopeAny"}}}},"Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvelopeAny"}}}},"NotFound":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvelopeAny"}}}},"PayloadTooLarge":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvelopeAny"}}}},"InternalError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvelopeNull"}}}}}},"paths":{"/passings":{"post":{"tags":["Passings"],"summary":"Insert passings","description":"Requires `WRITE` or `READ_WRITE` api key access type.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsertPassingsRequest"}}}},"responses":{"201":{"description":"Passings inserted succesfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsertPassingsResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"500":{"$ref":"#/components/responses/InternalError"}}}}}}
```

## Get session passings

> Requires \`READ\` or \`READ\_WRITE\` api key access type.

```json
{"openapi":"3.0.3","info":{"title":"RUFUS Public REST API","version":"0.1.0"},"tags":[{"name":"Passings"}],"servers":[{"url":"https://api.runonrufus.com/v0","description":"Production (v0)"}],"security":[{"ApiKeyHeader":[]},{"XApiKeyHeader":[]}],"components":{"securitySchemes":{"ApiKeyHeader":{"type":"apiKey","in":"header","name":"api_key","description":"API key for authentication."},"XApiKeyHeader":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key for authentication (alternate header)."}},"parameters":{"First":{"name":"first","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":-1},"description":"First num_passing to include (inclusive). Use -1 to ignore."},"Last":{"name":"last","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":-1},"description":"Last num_passing to include (inclusive). Use -1 to ignore."},"PageZeroBased":{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0},"description":"0 disables paging. When > 0, behaves like 1-based page."}},"schemas":{"PassingsListResponse":{"type":"object","additionalProperties":false,"properties":{"body":{"type":"object","additionalProperties":false,"properties":{"description":{"type":"string"},"result":{"type":"array","items":{"$ref":"#/components/schemas/Passing"}}},"required":["description"]}},"required":["body"]},"Passing":{"type":"object","additionalProperties":false,"properties":{"timestamp":{"type":"string","format":"date-time"},"num_passing":{"type":"integer","minimum":0},"bib":{"type":"string"},"participant_id":{"type":"string","nullable":true},"chip":{"type":"string","nullable":true},"latitude":{"type":"number","nullable":true},"longitude":{"type":"number","nullable":true},"status":{"type":"string","nullable":true},"timezone":{"type":"string","nullable":true},"gender":{"type":"string","nullable":true}},"required":["timestamp","num_passing","bib"]},"EnvelopeAny":{"type":"object","additionalProperties":false,"properties":{"body":{"description":"Operation result body."}}},"EnvelopeNull":{"type":"object","additionalProperties":false,"properties":{"body":{"nullable":true}},"required":["body"]}},"responses":{"Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvelopeAny"}}}},"NotFound":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvelopeAny"}}}},"InternalError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvelopeNull"}}}}}},"paths":{"/passings/session/{token_session}":{"get":{"tags":["Passings"],"summary":"Get session passings","description":"Requires `READ` or `READ_WRITE` api key access type.","parameters":[{"$ref":"#/components/parameters/First"},{"$ref":"#/components/parameters/Last"},{"$ref":"#/components/parameters/PageZeroBased"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PassingsListResponse"}}}},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalError"}}}}}}
```

## Get device passings

> Requires \`READ\` or \`READ\_WRITE\` api key access type.

```json
{"openapi":"3.0.3","info":{"title":"RUFUS Public REST API","version":"0.1.0"},"tags":[{"name":"Passings"}],"servers":[{"url":"https://api.runonrufus.com/v0","description":"Production (v0)"}],"security":[{"ApiKeyHeader":[]},{"XApiKeyHeader":[]}],"components":{"securitySchemes":{"ApiKeyHeader":{"type":"apiKey","in":"header","name":"api_key","description":"API key for authentication."},"XApiKeyHeader":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key for authentication (alternate header)."}},"parameters":{"From":{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter passings with timestamp >= from."},"To":{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter passings with timestamp <= to."},"PageZeroBased":{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0},"description":"0 disables paging. When > 0, behaves like 1-based page."}},"schemas":{"PassingsListResponse":{"type":"object","additionalProperties":false,"properties":{"body":{"type":"object","additionalProperties":false,"properties":{"description":{"type":"string"},"result":{"type":"array","items":{"$ref":"#/components/schemas/Passing"}}},"required":["description"]}},"required":["body"]},"Passing":{"type":"object","additionalProperties":false,"properties":{"timestamp":{"type":"string","format":"date-time"},"num_passing":{"type":"integer","minimum":0},"bib":{"type":"string"},"participant_id":{"type":"string","nullable":true},"chip":{"type":"string","nullable":true},"latitude":{"type":"number","nullable":true},"longitude":{"type":"number","nullable":true},"status":{"type":"string","nullable":true},"timezone":{"type":"string","nullable":true},"gender":{"type":"string","nullable":true}},"required":["timestamp","num_passing","bib"]},"EnvelopeAny":{"type":"object","additionalProperties":false,"properties":{"body":{"description":"Operation result body."}}},"EnvelopeNull":{"type":"object","additionalProperties":false,"properties":{"body":{"nullable":true}},"required":["body"]}},"responses":{"Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvelopeAny"}}}},"NotFound":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvelopeAny"}}}},"InternalError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvelopeNull"}}}}}},"paths":{"/passings/device/{deviceid}":{"get":{"tags":["Passings"],"summary":"Get device passings","description":"Requires `READ` or `READ_WRITE` api key access type.","parameters":[{"$ref":"#/components/parameters/From"},{"$ref":"#/components/parameters/To"},{"$ref":"#/components/parameters/PageZeroBased"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PassingsListResponse"}}}},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalError"}}}}}}
```
