Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

docs: update bash docs to include api key and authorization header

Brad Barbine961ab422b7a
diff --git a/apps/erp/app/modules/api/ui/Snippets.tsx b/apps/erp/app/modules/api/ui/Snippets.tsx
index 9fb1cff402..b326b0e20c 100644
--- a/apps/erp/app/modules/api/ui/Snippets.tsx
+++ b/apps/erp/app/modules/api/ui/Snippets.tsx
@@ -169,7 +169,9 @@ const carbon = createClient(SUPABASE_URL, process.env.${
code: `
curl -X POST '${endpoint}/rest/v1/rpc/${rpcName}' \\${bashParams}
-H "Content-Type: application/json" \\
--H "carbon-key: <your_api_key_here>"`,
+-H "carbon-key: <your_api_key_here>" \\
+-H "apiKey: CARBON_PUBLIC_KEY" \\
+-H "Authorization: Bearer CARBON_PUBLIC_KEY"`,
},
js: {
language: "js",
@@ -293,7 +295,9 @@ const ${listenerName} = carbon.channel('custom-filter-channel')
language: "bash",
code: `
curl '${endpoint}/rest/v1/${resourceId}?select=*' \\
--H "carbon-key: <your_api_key_here>"`,
+-H "carbon-key: <your_api_key_here>" \\
+-H "apiKey: CARBON_PUBLIC_KEY" \\
+-H "Authorization: Bearer CARBON_PUBLIC_KEY"`,
},
js: {
language: "js",
@@ -322,7 +326,9 @@ let { data: ${resourceId}, error } = await carbon
language: "bash",
code: `
curl '${endpoint}/rest/v1/${resourceId}?select=${columnName}' \\
--H "carbon-key: <your_api_key_here>"`,
+-H "carbon-key: <your_api_key_here>" \\
+-H "apiKey: CARBON_PUBLIC_KEY" \\
+-H "Authorization: Bearer CARBON_PUBLIC_KEY"`,
},
js: {
language: "js",
@@ -343,7 +349,9 @@ let { data: ${resourceId}, error } = await carbon
language: "bash",
code: `
curl '${endpoint}/rest/v1/${resourceId}?select=some_column,other_table(foreign_key)' \\
--H "carbon-key: <your_api_key_here>"`,
+-H "carbon-key: <your_api_key_here>" \\
+-H "apiKey: CARBON_PUBLIC_KEY" \\
+-H "Authorization: Bearer CARBON_PUBLIC_KEY"`,
},
js: {
language: "js",
@@ -366,6 +374,8 @@ let { data: ${resourceId}, error } = await carbon
code: `
curl '${endpoint}/rest/v1/${resourceId}?select=*' \\
-H "carbon-key: <your_api_key_here>" \\
+-H "apiKey: CARBON_PUBLIC_KEY" \\
+-H "Authorization: Bearer CARBON_PUBLIC_KEY" \\
-H "Range: 0-9"
`,
},
@@ -386,6 +396,8 @@ let { data: ${resourceId}, error } = await carbon
code: `
curl '${endpoint}/rest/v1/${resourceId}?id=eq.1&select=*' \\
-H "carbon-key: <your_api_key_here>" \\
+-H "apiKey: CARBON_PUBLIC_KEY" \\
+-H "Authorization: Bearer CARBON_PUBLIC_KEY" \\
-H "Range: 0-9"
`,
},
@@ -419,6 +431,8 @@ let { data: ${resourceId}, error } = await carbon
code: `
curl -X POST '${endpoint}/rest/v1/${resourceId}' \\
-H "carbon-key: <your_api_key_here>" \\
+-H "apiKey: CARBON_PUBLIC_KEY" \\
+-H "Authorization: Bearer CARBON_PUBLIC_KEY" \\
-H "Content-Type: application/json" \\
-H "Prefer: return=minimal" \\
-d '{ "some_column": "someValue", "other_column": "otherValue" }'
@@ -443,6 +457,8 @@ const { data, error } = await carbon
code: `
curl -X POST '${endpoint}/rest/v1/${resourceId}' \\
-H "carbon-key: <your_api_key_here>" \\
+-H "apiKey: CARBON_PUBLIC_KEY" \\
+-H "Authorization: Bearer CARBON_PUBLIC_KEY" \\
-H "Content-Type: application/json" \\
-d '[{ "some_column": "someValue" }, { "other_column": "otherValue" }]'
`,
@@ -467,6 +483,8 @@ const { data, error } = await carbon
code: `
curl -X POST '${endpoint}/rest/v1/${resourceId}' \\
-H "carbon-key: <your_api_key_here>" \\
+-H "apiKey: CARBON_PUBLIC_KEY" \\
+-H "Authorization: Bearer CARBON_PUBLIC_KEY" \\
-H "Content-Type: application/json" \\
-H "Prefer: resolution=merge-duplicates" \\
-d '{ "some_column": "someValue", "other_column": "otherValue" }'
@@ -489,6 +507,8 @@ const { data, error } = await carbon
code: `
curl -X PATCH '${endpoint}/rest/v1/${resourceId}?some_column=eq.someValue' \\
-H "carbon-key: <your_api_key_here>" \\
+-H "apiKey: CARBON_PUBLIC_KEY" \\
+-H "Authorization: Bearer CARBON_PUBLIC_KEY" \\
-H "Content-Type: application/json" \\
-H "Prefer: return=minimal" \\
-d '{ "other_column": "otherValue" }'
@@ -511,7 +531,9 @@ const { data, error } = await carbon
language: "bash",
code: `
curl -X DELETE '${endpoint}/rest/v1/${resourceId}?some_column=eq.someValue' \\
--H "carbon-key: <your_api_key_here>"`,
+-H "carbon-key: <your_api_key_here>" \\
+-H "apiKey: CARBON_PUBLIC_KEY" \\
+-H "Authorization: Bearer CARBON_PUBLIC_KEY"`,
},
js: {
language: "js",
@@ -530,6 +552,8 @@ const { error } = await carbon
code: `
curl -X POST '${endpoint}/auth/v1/signup' \\
-H "carbon-key: <your_api_key_here>" \\
+-H "apiKey: CARBON_PUBLIC_KEY" \\
+-H "Authorization: Bearer CARBON_PUBLIC_KEY" \\
-H "Content-Type: application/json" \\
-d '{
"email": "[email protected]",
@@ -554,6 +578,8 @@ let { data, error } = await carbon.auth.signUp({
code: `
curl -X POST '${endpoint}/auth/v1/token?grant_type=password' \\
-H "carbon-key: <your_api_key_here>" \\
+-H "apiKey: CARBON_PUBLIC_KEY" \\
+-H "Authorization: Bearer CARBON_PUBLIC_KEY" \\
-H "Content-Type: application/json" \\
-d '{
"email": "[email protected]",
@@ -578,6 +604,8 @@ let { data, error } = await carbon.auth.signInWithPassword({
code: `
curl -X POST '${endpoint}/auth/v1/magiclink' \\
-H "carbon-key: <your_api_key_here>" \\
+-H "apiKey: CARBON_PUBLIC_KEY" \\
+-H "Authorization: Bearer CARBON_PUBLIC_KEY" \\
-H "Content-Type: application/json" \\
-d '{
"email": "[email protected]"
@@ -600,6 +628,8 @@ let { data, error } = await carbon.auth.signInWithOtp({
code: `
curl -X POST '${endpoint}/auth/v1/signup' \\
-H "carbon-key: <your_api_key_here>" \\
+-H "apiKey: CARBON_PUBLIC_KEY" \\
+-H "Authorization: Bearer CARBON_PUBLIC_KEY" \\
-H "Content-Type: application/json" \\
-d '{
"phone": "+13334445555",
@@ -624,6 +654,8 @@ let { data, error } = await carbon.auth.signUp({
code: `
curl -X POST '${endpoint}/auth/v1/otp' \\
-H "carbon-key: <your_api_key_here>" \\
+-H "apiKey: CARBON_PUBLIC_KEY" \\
+-H "Authorization: Bearer CARBON_PUBLIC_KEY" \\
-H "Content-Type: application/json" \\
-d '{
"phone": "+13334445555"
@@ -712,7 +744,9 @@ let { data, error } = await carbon.auth.signInWithOAuth({
language: "bash",
code: `
curl -X GET '${endpoint}/auth/v1/user' \\
--H "carbon-key: <your_api_key_here>"
+-H "carbon-key: <your_api_key_here>" \\
+-H "apiKey: CARBON_PUBLIC_KEY" \\
+-H "Authorization: Bearer CARBON_PUBLIC_KEY"
`,
},
js: {
@@ -729,6 +763,8 @@ const { data: { user } } = await carbon.auth.getUser()
code: `
curl -X POST '${endpoint}/auth/v1/recover' \\
-H "carbon-key: <your_api_key_here>" \\
+-H "apiKey: CARBON_PUBLIC_KEY" \\
+-H "Authorization: Bearer CARBON_PUBLIC_KEY" \\
-H "Content-Type: application/json" \\
-d '{
"email": "[email protected]"
@@ -749,6 +785,8 @@ let { data, error } = await carbon.auth.resetPasswordForEmail(email)
code: `
curl -X PUT '${endpoint}/auth/v1/user' \\
-H "carbon-key: <your_api_key_here>" \\
+-H "apiKey: CARBON_PUBLIC_KEY" \\
+-H "Authorization: Bearer CARBON_PUBLIC_KEY" \\
-H "Content-Type: application/json" \\
-d '{
"email": "[email protected]",
@@ -777,6 +815,8 @@ const { data, error } = await carbon.auth.updateUser({
code: `
curl -X POST '${endpoint}/auth/v1/logout' \\
-H "carbon-key: <your_api_key_here>" \\
+-H "apiKey: CARBON_PUBLIC_KEY" \\
+-H "Authorization: Bearer CARBON_PUBLIC_KEY" \\
-H "Content-Type: application/json" \\
-H "Authorization: Bearer USER_TOKEN"
`,
diff --git a/apps/erp/app/modules/inventory/ui/Inventory/InventoryTable.tsx b/apps/erp/app/modules/inventory/ui/Inventory/InventoryTable.tsx
index 443999d0b2..7a4a85a306 100644
--- a/apps/erp/app/modules/inventory/ui/Inventory/InventoryTable.tsx
+++ b/apps/erp/app/modules/inventory/ui/Inventory/InventoryTable.tsx
@@ -93,7 +93,7 @@ const InventoryTable = memo(
},
{
accessorKey: "quantityOnProductionOrder",
- header: "On Prod Order",
+ header: "On Jobs",
cell: ({ row }) => row.original.quantityOnProductionOrder,
meta: {
icon: <LuFactory />,