Your Own Website
If your company has its own website, Astra can feed it: the products you mark with Publish on website appear there with their price and photos, and leave the site the moment they sell on an invoice. Used devices are published one by one, each with its own serial, condition and battery. You connect it once from Settings → Integrations.
Your own website comes with the Sincronización Ecommerce add-on, the same one as the BigCommerce online store. Without it, the Online sales channels section does not appear in Integrations and the Publish on website checkbox does not appear on the product. You connect one website per organization, and it can be connected alongside BigCommerce: both sell from the same Astra stock.
Connect the website
Choose Settings at the bottom of the main sidebar. In the Connections group, open Integrations and scroll down to the Online sales channels section. While it is not connected, Your own website is one line with a Connect button; click it to see the address field.
- In Your website address type the full address, for example
https://www.yourcompany.com. Astra will send change notices to that address plus/api/astra/webhook. - Click Connect website. The message “Website connected. Copy the details into your site.” appears.
- A yellow box, Details for your website, shows three lines:
ASTRA_URL,ASTRA_CATALOG_KEYandASTRA_WEBHOOK_SECRET. Click Copy details and paste them into your website’s settings, or send them to whoever runs it. - Once they are safe, click I copied them.
For security, Details for your website is not shown again after you click I copied them or leave the screen. If you lose them, disconnect the website and connect it again: new details are generated and the old ones stop working.
Publish a product
Open the product to edit it and turn on Publish on website. The product shows on your site while it has stock and leaves the moment it sells on an invoice. A product that does not track inventory shows all the time while it is published and active. The checkbox and the Units tab only appear while the website is connected; if you disconnect it, they disappear until you connect it again.
Your own website, in Integrations, counts how many products are published. Turning the checkbox off, deactivating the product or running out of stock takes it off the site.
Used devices: one listing per unit
One used phone is not the same as another of the same model: battery, condition and price differ. That is why, for a Serialized item, the site doesn't show the product once but each available unit on its own, with its condition, grade, battery, price and public note. Units are recorded in the product's Units tab: how to add them and what each field means is in Serialized Items.
Every Available unit appears on the site. Units marked Not shown (Show on the website turned off) and Sold units don't. A unit that comes in with a purchase starts as Not shown: fill in its grade and battery and turn it on. The site only receives the last four digits of the serial.
What happens when an invoice sells or is cancelled
- A published product is invoiced: if its stock reaches zero, it leaves the website at that moment.
- A device is invoiced with its serial: the unit is marked Sold by itself and leaves the site. Nothing to mark by hand.
- The invoice is cancelled or a credit note returns the serial: the unit is Available again and reappears on the site.
The same goes for any other inventory movement: a received purchase, an adjustment or a transfer that changes the stock of a published product shows on the site.
What the website receives
The site receives only public data about what you published: name, description, category, photos, SKU, price with tax and currency, availability and, for used devices, condition, grade, battery, cycles, the last four digits of the serial and the public note. It never receives costs, suppliers, margins, warehouses or internal notes.
Notices paused
Every change is notified to the website right away. If the site does not answer, Astra retries. If it fails three times in a row, Astra pauses the notices so it does not keep insisting, and the section shows: “Notices paused: the site did not answer three times in a row. Check it is online and resume them.”. Check that your site is online and click Resume notices. While they are paused, the site can still read the whole catalog whenever it needs to.
The last notice shows on the card: “Last notice to the site: …, received.” or, if it failed, “Last notice to the site: …, the site did not answer. Astra retries it.”.
Disconnect
Click Disconnect and confirm in “Disconnect the website?”. The site stops receiving the catalog and the sale notices. Products stay marked in Astra: connect again and they come back. The earlier details stop working, so the site will need the new ones.
For whoever runs the website
This part is for the person who builds or maintains the site. If you only publish products, you can skip it.
- The three variables.
ASTRA_URLis Astra’s address,ASTRA_CATALOG_KEYis a read-only API key (scopecatalog:read) andASTRA_WEBHOOK_SECRETis the secret the notices are signed with. Store them like any other site secret, never in code or in the browser. - The catalog.
GET /api/v1/catalogreturns, paginated, one item for each published product or for each available unit of a serialized item;GET /api/v1/catalog/{id}returns one. Send the key in theAuthorization: Bearerheader, like the rest of the API. Every field is described in the browsable reference at /api/docs. - The notices. Astra calls the site’s address plus
/api/astra/webhookwith three events:listing.published(something new appears on the site),listing.updated(the price, photos, name or stock changed) andlisting.unavailable(it sold, ran out or was unpublished). The body carries the same item the catalog returns, so the site never has to ask back. - The signature. Every notice carries the
Astra-Signatureheader and is verified like any Astra webhook, with the secret above: the procedure is in API & Webhooks. Reject notices whose signature does not match. - Reconciliation. A notice can get lost. We recommend the site re-reads the whole catalog on every build and every so often, so any difference heals itself.
- In this first version the site only reads: customer inquiries keep arriving by WhatsApp or the site’s form, and the sale is invoiced in Astra.
This site’s notice subscription also shows in Webhooks, and its key in the API keys list under the name Website.
Need more help?
Our team is ready to assist you.