---
# System prepended metadata

title: Create Form3 Memo

---

# Create Form3 Memo

1. CREATE MEMO 🔗 **PATCH: api/memos-real/**
```
{
    "form": 3,
    "loa": "",  # input loa custom 
    "is_permission": false,
    "loa_group": null,   # input loa not custom 
    "from_profile": {profile_id},
    "cc_list": [{profile_id}, ..],
    "to": [{profile_id}, ..],
    "announce_location": [{location_id}, ..],
    "announce_division": [{division_id}, ..],
    "announce_department": [{department_id}, ..]
}
```


2. CREATE FORM3 🔗 **POST: api/memos-form3/**
```
{
    "memo": {memo_id},
    "owner": "Company",  # owner choices: Company, Customer
    "purpose": "",  # purpose choices: Delivery, Repair
    "reason_item": "",
    "arrival_date": "yyyy-mm-dd",
    "item_detail": [
        {
            "id": None,
            "amount": 0,
            "unit": "",
            "items": "",
            "job_number": "",
            "customer_name": "",
        }
    ],
}
```

3. UPDATE 🔗 **PATCH: api/memos-form3/{id}/**

<hr>

4. Update Item Detail 🔗 **PATCH: api/memos-form3/{id}/** 
like memo form 2 : https://hackmd.io/aZZ9rEOtR_ql4hKoDQS9tA

5. Example Context PDF Form 3 📝
For use variable in PDF

```
{
   "memo_number":"1234",
   "owner":"Customer",
   "purpose":"Repair",
   "create_date":1,
   "create_month":"กันยายน",
   "create_year":2563,
   "arrival_date":"07-Aug-2020",
   "reason_item":"โต๊ะขาหัก",
   "created_by_name":"Ratthanan Paethanomnit",
   "created_by_position":"Software Dev",
   "created_by_department":"ส่วนควบคุมสต๊อคอะไหล่",
   "item_detail":[
      {
         "amount":Decimal("30.00"),
         "unit":"ชิ้น",
         "items":"โต๊ะ",
         "job_number"": ABC 123",
         "customer_name":"Lisa"
      },
      {
         "amount":Decimal("20.00"),
         "unit":"ชิ้น",
         "items":"เก้าอี้",
         "job_number"": ABC 124",
         "customer_name":"Jennie"
      }
   ],
   "company":{
      "id":1,
      "sequence":0,
      "name":"บริษัท บางกอกโคมัตสุ เซลล์ จำกัด",
      "name_en":"Bankgkok Komatsu Sales",
      "address":"28/9 หมู่ 3 ถนนบางนา-ตราด กม.23 ต.บางเสาธง อ.บางเสาธง จ.สมุทรปราการ 10570",
      "address_en":"28/9 Moo 3 Bangna-Trad Road Km.23, Bangsaothong, Bangsaothong, Samutprakarn 10570",
      "tel":"0-2-663-2666",
      "fax":"0-2663-2566",
      "website":"www.bangkokkomatsusales.com"
   }
}
```