Skip to content

orca-scan/orca-webhook-dotnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

orca-webhook-dotnet

Connect Orca Scan to your own system using webhooks. When a user scans a barcode and adds, updates, or deletes a row, Orca Scan sends the data to your server in real-time - no polling, no manual exports.

This C# example shows you how to:

  • Receive scan data from Orca Scan as it happens (Webhook Out)
  • Push data back into Orca Scan from your own system (Webhook In)

Quick start

Requires .NET SDK 6.0 or later.

git clone https://github.com/orca-scan/orca-webhook-dotnet.git
cd orca-webhook-dotnet
dotnet run

Server runs on port 8888.

Receiving data from Orca Scan (Webhook Out)

When a barcode is scanned and a row changes, Orca Scan sends a POST request to /orca-webhook-out with the row data as JSON. You can use this to sync inventory to your database, trigger alerts, update dashboards — whatever your workflow needs.

Every request includes these system fields:

Field Description
___orca_event rows:add, rows:update, rows:delete, or test
___orca_sheet_name The sheet that triggered the event
___orca_user_email Email of the user (HTTPS only)

All other fields match your sheet column names exactly (case and space sensitive).

The full docs cover additional events like import, clear, and security headers.

Test with cURL

curl -X POST 'http://127.0.0.1:8888/orca-webhook-out' \
-H 'Content-Type: application/json' \
-d '{
    "___orca_event": "rows:add",
    "___orca_sheet_name": "Vehicle Checks",
    "___orca_user_email": "hidden@requires.https",
    "___orca_row_id": "5cf5c1efc66a9681047a0f3d",
    "Barcode": "4S3BMHB68B3286050",
    "Make": "SUBARU",
    "Model": "Legacy",
    "Model Year": "2011",
    "Vehicle Type": "PASSENGER CAR",
    "Plant City": "Lafayette",
    "Trim": "Premium",
    "Location": "52.2034823, 0.1235817",
    "Notes": "Needs new tires"
}'

Test with Orca Scan

Expose your local server with localtunnel:

npx localtunnel --port 8888

Then add the tunnel URL as your Webhook Out endpoint in the Orca Scan web app and hit Test.

Webhooks are fire-and-forget — they are not retried regardless of HTTP response.

Pushing data into Orca Scan (Webhook In)

Need to update Orca Scan from your own system? Hit GET /trigger-webhook-in to push a row into a sheet via the Webhook In API.

To connect it to your sheet, update the URL in server.cs:

https://api.orcascan.com/sheets/{id}

See the REST API docs for all available endpoints.

Examples in other languages

Language Repository
Node.js orca-webhook-node
Python orca-webhook-python
Go orca-webhook-go
Java orca-webhook-java
PHP orca-webhook-php

Help

Chat to us live if you run into any issues.

License

© Orca Scan, the Barcode Scanner app for iOS and Android.

About

Orca Scan WebHook examples in C#

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages