docs: general fixes across docs (#4737)

* docs: general fixes across docs

* added deploy button to railway

* fix eslint errors

* fixes
This commit is contained in:
Shahed Nasser
2023-08-10 11:44:20 +03:00
committed by GitHub
parent f8d3d5f91a
commit 2363a5324e
9 changed files with 99 additions and 44 deletions

View File

@@ -29,16 +29,16 @@ Part of the process of importing products is uploading a CSV file. This requires
- [MinIO](../../../plugins/file-service/minio.md) (At least version `1.1.0`)
- [Spaces](../../../plugins/file-service/spaces.md)
### CSV File
You must have a CSV file that you will use to import products into your Medusa backend. You can check [this CSV example file](https://medusa-doc-files.s3.amazonaws.com/product-import-1.3.8.csv) to see which format is required for your import.
:::note
If you have Sales Channels enabled on your backend, you must use [this CSV example file](https://medusa-doc-files.s3.amazonaws.com/product-import-sales-channels.csv) instead.
The local file service can't be used for product import.
:::
### CSV File
You must have a CSV file that you will use to import products into your Medusa backend. You can check [this CSV example file](https://medusa-doc-files.s3.amazonaws.com/product-import-sales-channels.csv) to see which format is required for your import.
### JS Client
This guide includes code snippets to send requests to your Medusa backend using Medusas JS Client, among other methods.
@@ -122,7 +122,6 @@ fetch(`<BACKEND_URL>/admin/uploads`, {
```bash
curl -L -X POST '<BACKEND_URL>/admin/uploads' \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'Content-Type: text/csv' \
-F 'files=@"<FILE_PATH_1>"'
```
@@ -131,6 +130,8 @@ curl -L -X POST '<BACKEND_URL>/admin/uploads' \
This request returns an array of uploads. Each item in the array is an object that includes the properties `url` and `key`. Youll need the `key` to import the products next.
Where `<FILE_PATH_1>` is a full path to the file. For example, `/Users/medusa/product-import-sales-channels.csv`
---
## 2. Create a Batch Job for Product Import